diff options
-rw-r--r-- | newlib/ChangeLog | 6 | ||||
-rw-r--r-- | newlib/libc/include/sys/config.h | 1 | ||||
-rw-r--r-- | newlib/libc/sys/linux/io.c | 4 |
3 files changed, 9 insertions, 2 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 4e1c5824f..e00faf93f 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,5 +1,11 @@ 2002-06-21 Jeff Johnston <jjohnstn@redhat.com> + * libc/include/sys/config.h[__linux__]: Set _READ_WRITE_RETURN_TYPE + to _ssize_t. + * libc/sys/linux/io.c (read, write): Change to return ssize_t. + +2002-06-21 Jeff Johnston <jjohnstn@redhat.com> + * libc/include/stdio.h (__getline, __getdelim): New prototypes. * libc/include/time.h [HAVE_GETDATE](getdate, getdate_r): Ditto. [HAVE_GETDATE](getdate_err): New error code. diff --git a/newlib/libc/include/sys/config.h b/newlib/libc/include/sys/config.h index 85683bc70..ae4fcdaa3 100644 --- a/newlib/libc/include/sys/config.h +++ b/newlib/libc/include/sys/config.h @@ -59,6 +59,7 @@ #define __DYNAMIC_REENT__ #define HAVE_GETDATE #define _HAVE_SYSTYPES +#define _READ_WRITE_RETURN_TYPE _ssize_t #endif #endif diff --git a/newlib/libc/sys/linux/io.c b/newlib/libc/sys/linux/io.c index 242c7cbf8..8da724e1f 100644 --- a/newlib/libc/sys/linux/io.c +++ b/newlib/libc/sys/linux/io.c @@ -20,9 +20,9 @@ #define __NR___flock __NR_flock #define __NR___mknod __NR_mknod -_syscall3(int,read,int,fd,void *,buf,size_t,count) +_syscall3(ssize_t,read,int,fd,void *,buf,size_t,count) _syscall3(ssize_t,readv,int,fd,const struct iovec *,vec,int,count) -_syscall3(int,write,int,fd,const void *,buf,size_t,count) +_syscall3(ssize_t,write,int,fd,const void *,buf,size_t,count) _syscall3(ssize_t,writev,int,fd,const struct iovec *,buf,int,count) _syscall3(int,open,const char *,file,int,flag,mode_t,mode) _syscall1(int,close,int,fd) |