aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdio
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2001-03-06 01:04:43 +0000
committerJeff Johnston <jjohnstn@redhat.com>2001-03-06 01:04:43 +0000
commitcfc05d9675436a157ea959a5fb06da60722234c7 (patch)
treedfd096db23b4c24f2be67e69276e7b10c9cc04d6 /newlib/libc/stdio
parenta887211b0012ee3ce20e1327bb0a6ed49719edf5 (diff)
downloadnewlib-cfc05d9675436a157ea959a5fb06da60722234c7.zip
newlib-cfc05d9675436a157ea959a5fb06da60722234c7.tar.gz
newlib-cfc05d9675436a157ea959a5fb06da60722234c7.tar.bz2
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/stdio')
-rw-r--r--newlib/libc/stdio/local.h4
-rw-r--r--newlib/libc/stdio/sscanf.c2
-rw-r--r--newlib/libc/stdio/stdio.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/newlib/libc/stdio/local.h b/newlib/libc/stdio/local.h
index 24e02e8..dfe5e79 100644
--- a/newlib/libc/stdio/local.h
+++ b/newlib/libc/stdio/local.h
@@ -31,8 +31,8 @@ extern int _EXFUN(__svfscanf,(FILE *, _CONST char *,va_list));
extern FILE *_EXFUN(__sfp,(struct _reent *));
extern int _EXFUN(__sflags,(struct _reent *,_CONST char*, int*));
extern int _EXFUN(__srefill,(FILE *));
-extern int _EXFUN(__sread,(void *, char *, int));
-extern int _EXFUN(__swrite,(void *, char const *, int));
+extern _READ_WRITE_RETURN_TYPE _EXFUN(__sread,(void *, char *, int));
+extern _READ_WRITE_RETURN_TYPE _EXFUN(__swrite,(void *, char const *, int));
extern fpos_t _EXFUN(__sseek,(void *, fpos_t, int));
extern int _EXFUN(__sclose,(void *));
extern int _EXFUN(__stextmode,(int));
diff --git a/newlib/libc/stdio/sscanf.c b/newlib/libc/stdio/sscanf.c
index eb34423..5a403de 100644
--- a/newlib/libc/stdio/sscanf.c
+++ b/newlib/libc/stdio/sscanf.c
@@ -344,7 +344,7 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
/* | ARGSUSED */
/*SUPPRESS 590*/
static
-int
+_READ_WRITE_RETURN_TYPE
eofread (cookie, buf, len)
_PTR cookie;
char *buf;
diff --git a/newlib/libc/stdio/stdio.c b/newlib/libc/stdio/stdio.c
index ddebc8a..b0c759f 100644
--- a/newlib/libc/stdio/stdio.c
+++ b/newlib/libc/stdio/stdio.c
@@ -28,7 +28,7 @@
* These maintain the `known seek offset' for seek optimisation.
*/
-int
+_READ_WRITE_RETURN_TYPE
__sread (cookie, buf, n)
_PTR cookie;
char *buf;
@@ -59,7 +59,7 @@ __sread (cookie, buf, n)
return ret;
}
-int
+_READ_WRITE_RETURN_TYPE
__swrite (cookie, buf, n)
_PTR cookie;
char _CONST *buf;