diff options
author | Ryan Harkin <ryan.harkin@linaro.org> | 2014-02-10 17:17:04 +0000 |
---|---|---|
committer | Dan Handley <dan.handley@arm.com> | 2014-02-20 19:06:34 +0000 |
commit | cd529320988a559c3408292f09e443233d2157c3 (patch) | |
tree | 269f79bb314e15220227cda09ca8f56d7cae7ca3 /include/semihosting.h | |
parent | 2f2cef46573cc55204e7873795b2c31fcc9f6216 (diff) |
Fix semihosting with latest toolchain
Fixes issues #10:
https://github.com/ARM-software/tf-issues/issues/10
This patch changes all/most variables of type int to be size_t or long
to fix the sizing and alignment problems found when building with the
newer toolchains such as Linaro GCC 13.12 or later.
Change-Id: Idc9d48eb2ff9b8c5bbd5b227e6907263d1ea188b
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Diffstat (limited to 'include/semihosting.h')
-rw-r--r-- | include/semihosting.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/include/semihosting.h b/include/semihosting.h index 0244cade..e688618a 100644 --- a/include/semihosting.h +++ b/include/semihosting.h @@ -57,16 +57,20 @@ #define FOPEN_MODE_APLUS 0xa #define FOPEN_MODE_APLUSB 0xb -int semihosting_connection_supported(void); -int semihosting_file_open(const char *file_name, unsigned int mode); -int semihosting_file_seek(int file_handle, unsigned int offset); -int semihosting_file_read(int file_handle, int *length, void *buffer); -int semihosting_file_write(int file_handle, int *length, const void *buffer); -int semihosting_file_close(int file_handle); -int semihosting_file_length(int file_handle); -int semihosting_system(char *command_line); -int semihosting_get_flen(const char* file_name); -int semihosting_download_file(const char* file_name, int buf_size, void *buf); +long semihosting_connection_supported(void); +long semihosting_file_open(const char *file_name, size_t mode); +long semihosting_file_seek(long file_handle, ssize_t offset); +long semihosting_file_read(long file_handle, size_t *length, void *buffer); +long semihosting_file_write(long file_handle, + size_t *length, + const void *buffer); +long semihosting_file_close(long file_handle); +long semihosting_file_length(long file_handle); +long semihosting_system(char *command_line); +long semihosting_get_flen(const char *file_name); +long semihosting_download_file(const char *file_name, + size_t buf_size, + void *buf); void semihosting_write_char(char character); void semihosting_write_string(char *string); char semihosting_read_char(void); |