This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

read/write return type


A patch has been checked into newlib whereby the return type for read() and write() is set in
libc/include/sys/config.h.  By default, this will be int to protect the legacy code out there.  For
platforms that want to use the POSIX definition (currently just RTEMS), the value can be set to
ssize_t.

The following is the ChangeLog entry:

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.

-- Jeff J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]