[Aarch64] Syscalls: fix prototypes
This patch is similar the arm one committed recently. 2018-10-08 Christophe Lyon <christophe.lyon@linaro.org> * libgloss/aarch64/syscalls.c (_sbrk): Fix prototype. (_getpid, _write, _swiwrite, _lseek, _swilseek, _read, _wriread): Likewise.
This commit is contained in:
		
				
					committed by
					
						 Richard Earnshaw
						Richard Earnshaw
					
				
			
			
				
	
			
			
			
						parent
						
							8a7536e91d
						
					
				
				
					commit
					b6ba19e355
				
			| @@ -57,19 +57,19 @@ int _link (void); | |||||||
| int _stat (const char *, struct stat *); | int _stat (const char *, struct stat *); | ||||||
| int _fstat (int, struct stat *); | int _fstat (int, struct stat *); | ||||||
| int _swistat (int fd, struct stat * st); | int _swistat (int fd, struct stat * st); | ||||||
| caddr_t _sbrk (int); | void * _sbrk (ptrdiff_t); | ||||||
| int _getpid (int); | pid_t _getpid (void); | ||||||
| int _close (int); | int _close (int); | ||||||
| clock_t _clock (void); | clock_t _clock (void); | ||||||
| int _swiclose (int); | int _swiclose (int); | ||||||
| int _open (const char *, int, ...); | int _open (const char *, int, ...); | ||||||
| int _swiopen (const char *, int); | int _swiopen (const char *, int); | ||||||
| int _write (int, char *, int); | int _write (int, const char *, size_t); | ||||||
| int _swiwrite (int, char *, int); | int _swiwrite (int, const char *, size_t); | ||||||
| int _lseek (int, int, int); | off_t _lseek (int, off_t, int); | ||||||
| int _swilseek (int, int, int); | off_t _swilseek (int, off_t, int); | ||||||
| int _read (int, char *, int); | int _read (int, void *, size_t); | ||||||
| int _swiread (int, char *, int); | int _swiread (int, void *, size_t); | ||||||
| void initialise_monitor_handles (void); | void initialise_monitor_handles (void); | ||||||
|  |  | ||||||
| static int checkerror (int); | static int checkerror (int); | ||||||
| @@ -349,7 +349,7 @@ checkerror (int result) | |||||||
|    len, is the length in bytes to read. |    len, is the length in bytes to read. | ||||||
|    Returns the number of bytes *not* written. */ |    Returns the number of bytes *not* written. */ | ||||||
| int | int | ||||||
| _swiread (int fh, char *ptr, int len) | _swiread (int fh, void *ptr, size_t len) | ||||||
| { | { | ||||||
|   param_block_t block[3]; |   param_block_t block[3]; | ||||||
|  |  | ||||||
| @@ -364,7 +364,7 @@ _swiread (int fh, char *ptr, int len) | |||||||
|    Translates the return of _swiread into |    Translates the return of _swiread into | ||||||
|    bytes read. */ |    bytes read. */ | ||||||
| int | int | ||||||
| _read (int fd, char *ptr, int len) | _read (int fd, void *ptr, size_t len) | ||||||
| { | { | ||||||
|   int res; |   int res; | ||||||
|   struct fdent *pfd; |   struct fdent *pfd; | ||||||
| @@ -389,8 +389,8 @@ _read (int fd, char *ptr, int len) | |||||||
| } | } | ||||||
|  |  | ||||||
| /* fd, is a user file descriptor. */ | /* fd, is a user file descriptor. */ | ||||||
| int | off_t | ||||||
| _swilseek (int fd, int ptr, int dir) | _swilseek (int fd, off_t ptr, int dir) | ||||||
| { | { | ||||||
|   int res; |   int res; | ||||||
|   struct fdent *pfd; |   struct fdent *pfd; | ||||||
| @@ -449,7 +449,8 @@ _swilseek (int fd, int ptr, int dir) | |||||||
|     return -1; |     return -1; | ||||||
| } | } | ||||||
|  |  | ||||||
| _lseek (int fd, int ptr, int dir) | off_t | ||||||
|  | _lseek (int fd, off_t ptr, int dir) | ||||||
| { | { | ||||||
|   return _swilseek (fd, ptr, dir); |   return _swilseek (fd, ptr, dir); | ||||||
| } | } | ||||||
| @@ -457,7 +458,7 @@ _lseek (int fd, int ptr, int dir) | |||||||
| /* fh, is a valid internal file handle. | /* fh, is a valid internal file handle. | ||||||
|    Returns the number of bytes *not* written. */ |    Returns the number of bytes *not* written. */ | ||||||
| int | int | ||||||
| _swiwrite (int fh, char *ptr, int len) | _swiwrite (int fh, const char *ptr, size_t len) | ||||||
| { | { | ||||||
|   param_block_t block[3]; |   param_block_t block[3]; | ||||||
|  |  | ||||||
| @@ -470,7 +471,7 @@ _swiwrite (int fh, char *ptr, int len) | |||||||
|  |  | ||||||
| /* fd, is a user file descriptor. */ | /* fd, is a user file descriptor. */ | ||||||
| int | int | ||||||
| _write (int fd, char *ptr, int len) | _write (int fd, const char *ptr, size_t len) | ||||||
| { | { | ||||||
|   int res; |   int res; | ||||||
|   struct fdent *pfd; |   struct fdent *pfd; | ||||||
| @@ -620,7 +621,7 @@ _close (int fd) | |||||||
| } | } | ||||||
|  |  | ||||||
| int __attribute__((weak)) | int __attribute__((weak)) | ||||||
| _getpid (int n __attribute__ ((unused))) | _getpid (void) | ||||||
| { | { | ||||||
|   return 1; |   return 1; | ||||||
| } | } | ||||||
| @@ -628,8 +629,8 @@ _getpid (int n __attribute__ ((unused))) | |||||||
| /* Heap limit returned from SYS_HEAPINFO Angel semihost call.  */ | /* Heap limit returned from SYS_HEAPINFO Angel semihost call.  */ | ||||||
| ulong __heap_limit __attribute__ ((aligned (8))) = 0xcafedead; | ulong __heap_limit __attribute__ ((aligned (8))) = 0xcafedead; | ||||||
|  |  | ||||||
| caddr_t | void * | ||||||
| _sbrk (int incr) | _sbrk (ptrdiff_t incr) | ||||||
| { | { | ||||||
|   extern char end asm ("end");	/* Defined by the linker.  */ |   extern char end asm ("end");	/* Defined by the linker.  */ | ||||||
|   static char *heap_end; |   static char *heap_end; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user