Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libgloss/i960/mon-read.c')
-rw-r--r--libgloss/i960/mon-read.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libgloss/i960/mon-read.c b/libgloss/i960/mon-read.c
new file mode 100644
index 000000000..92e15d258
--- /dev/null
+++ b/libgloss/i960/mon-read.c
@@ -0,0 +1,18 @@
+#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;
+}