mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-16 03:19:54 +08:00
cfc05d9675
* 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.
18 lines
290 B
C
18 lines
290 B
C
/* connector for write */
|
|
|
|
#include <reent.h>
|
|
#include <unistd.h>
|
|
|
|
_READ_WRITE_RETURN_TYPE
|
|
write (fd, buf, cnt)
|
|
int fd;
|
|
const void *buf;
|
|
size_t cnt;
|
|
{
|
|
#ifdef REENTRANT_SYSCALLS_PROVIDED
|
|
return _write_r (_REENT, fd, buf, cnt);
|
|
#else
|
|
return _write (fd, buf, cnt);
|
|
#endif
|
|
}
|