diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2001-03-06 04:04:43 +0300 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2001-03-06 04:04:43 +0300 |
commit | cfc05d9675436a157ea959a5fb06da60722234c7 (patch) | |
tree | dfd096db23b4c24f2be67e69276e7b10c9cc04d6 /newlib/libc/include/sys/unistd.h | |
parent | a887211b0012ee3ce20e1327bb0a6ed49719edf5 (diff) |
Mon Mar 5 21:48:54 2001 J"orn Rennecke <amylaar@redhat.com>
* libc/include/sys/config.h (_READ_WRITE_RETURN_TYPE): Define.
For RTEMS, define to be ssize_t. Default to int if not defined.
* libc/stdio/sscanf.c (eofread): Return _READ_WRITE_RETURN_TYPE.
* libc/stdio/stdio.c (__sread, __swrite): Likewise.
* libc/stdio/local.h (__sread, __swrite): Likewise.
* libc/include/sys/reent.h (_read, _write): Likewise.
* libc/include/sys/unistd.h (read, write, _read, _write): Likewise.
* libc/syscalls/sysread.c (read): Likewise.
* libc/syscalls/syswrite.c (write): Likewise.
Diffstat (limited to 'newlib/libc/include/sys/unistd.h')
-rw-r--r-- | newlib/libc/include/sys/unistd.h | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h index 143129f86..9741dafb5 100644 --- a/newlib/libc/include/sys/unistd.h +++ b/newlib/libc/include/sys/unistd.h @@ -66,12 +66,7 @@ off_t _EXFUN(lseek, (int __fildes, off_t __offset, int __whence )); long _EXFUN(pathconf, (const char *__path, int __name )); int _EXFUN(pause, (void )); int _EXFUN(pipe, (int __fildes[2] )); -/* POSIX 1003.1b-1993 says read() returns ssize_t */ -#if defined(__rtems__) -ssize_t _EXFUN(read, (int __fildes, void *__buf, size_t __nbyte )); -#else -int _EXFUN(read, (int __fildes, void *__buf, size_t __nbyte )); -#endif +_READ_WRITE_RETURN_TYPE _EXFUN(read, (int __fd, void *__buf, size_t __nbyte )); int _EXFUN(rmdir, (const char *__path )); #if defined(__rtems__) void * _EXFUN(sbrk, (ptrdiff_t __incr)); @@ -95,12 +90,7 @@ int _EXFUN(tcsetpgrp, (int __fildes, pid_t __pgrp_id )); char _EXFUN(*ttyname, (int __fildes )); int _EXFUN(unlink, (const char *__path )); int _EXFUN(vhangup, (void )); -/* POSIX 1003.1b-1993 says write() returns ssize_t */ -#if defined(__rtems__) -ssize_t _EXFUN(write, (int __fildes, const void *__buf, size_t __nbyte )); -#else -int _EXFUN(write, (int __fildes, const void *__buf, size_t __nbyte )); -#endif +_READ_WRITE_RETURN_TYPE _EXFUN(write, (int __fd, const void *__buf, size_t __nbyte )); #ifndef _POSIX_SOURCE pid_t _EXFUN(vfork, (void )); @@ -113,10 +103,10 @@ pid_t _EXFUN(_fork, (void )); pid_t _EXFUN(_getpid, (void )); int _EXFUN(_link, (const char *__path1, const char *__path2 )); off_t _EXFUN(_lseek, (int __fildes, off_t __offset, int __whence )); -int _EXFUN(_read, (int __fildes, void *__buf, size_t __nbyte )); +_READ_WRITE_RETURN_TYPE _EXFUN(_read, (int __fd, void *__buf, size_t __nbyte )); void * _EXFUN(_sbrk, (size_t __incr)); int _EXFUN(_unlink, (const char *__path )); -int _EXFUN(_write, (int __fildes, const void *__buf, size_t __nbyte )); +_READ_WRITE_RETURN_TYPE _EXFUN(_write, (int __fd, const void *__buf, size_t __nbyte )); int _EXFUN(_execve, (const char *__path, char * const __argv[], char * const __envp[] )); #if defined(__CYGWIN__) || defined(__rtems__) |