4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-15 11:00:04 +08:00

19 lines
223 B
C
Raw Normal View History

2000-03-17 22:48:54 +00:00
#include <errno.h>
read (fd, buf, sz)
int fd;
char *buf;
int sz;
{
int nread;
int r;
r = _sys_read (fd, buf, sz, &nread);
if (r != 0)
{
errno = r;
return -1;
}
return nread;
}