From cfc05d9675436a157ea959a5fb06da60722234c7 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 6 Mar 2001 01:04:43 +0000 Subject: Mon Mar 5 21:48:54 2001 J"orn Rennecke * 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. --- newlib/libc/stdio/local.h | 4 ++-- newlib/libc/stdio/sscanf.c | 2 +- newlib/libc/stdio/stdio.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'newlib/libc/stdio') diff --git a/newlib/libc/stdio/local.h b/newlib/libc/stdio/local.h index 24e02e8e4..dfe5e796e 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 eb344238d..5a403de5c 100644 --- a/newlib/libc/stdio/sscanf.c +++ b/newlib/libc/stdio/sscanf.c @@ -344,7 +344,7 @@ Supporting OS subroutines required: <>, <>, <>, /* | 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 ddebc8a39..b0c759fdb 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; -- cgit v1.2.3