diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2013-10-23 10:04:43 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2013-10-23 10:04:43 +0000 |
commit | 0c3d8e5ab5f177ae080bf7afa2cbdc5ebcc9f401 (patch) | |
tree | 4a947f48e5edc605a8b04cc9c9033e010a665448 /newlib/libc/stdio/stdio.c | |
parent | 27f8495dd59a4d5827040ab599ef457ee9e21af6 (diff) | |
download | newlib-0c3d8e5ab5f177ae080bf7afa2cbdc5ebcc9f401.zip newlib-0c3d8e5ab5f177ae080bf7afa2cbdc5ebcc9f401.tar.gz newlib-0c3d8e5ab5f177ae080bf7afa2cbdc5ebcc9f401.tar.bz2 |
* libc/include/stdio.h (funopen): Change prototype of
__readfn and __writefn parameter to match new definition of
FILE's _read and _write methods.
(_funopen_r): Ditto.
(funopen): Ditto.
(_funopen_r): Ditto.
* libc/include/sys/config.h (_READ_WRITE_BUFSIZE_TYPE) Define
as type int if not already defined. Add comment to explain.
* libc/include/sys/reent.h: Include stddef.h.
(struct __sFILE): Change type of last parameter in declaration
of _read and _write methods to _READ_WRITE_BUFSIZE_TYPE.
(struct __sFILE64): Ditto.
* libc/stdio/local.h (__sread): Declare with last parameter set
to _READ_WRITE_BUFSIZE_TYPE.
(__seofread): Ditto.
(__swrite): Ditto.
(__swrite64): Ditto.
* libc/stdio/fvwrite.c (__sfvwrite_r): Change type of local
variables w and s to _READ_WRITE_RETURN_TYPE.
* libc/stdio/fflush.c (__sflush_r): Change type of local variables
n and t to _READ_WRITE_BUFSIZE_TYPE and _READ_WRITE_RETURN_TYPE.
Add local variables flags to keep _flags value.
* libc/stdio/fmemopen.c (fmemreader): Align to above change.
(fmemwriter): Ditto.
* libc/stdio/fopencookie.c (fcreader): Ditto.
(fcwriter): Ditto.
* libc/stdio/funopen.c (funread): Ditto.
(funwrite): Ditto.
(funreader): Ditto.
(funwriter): Ditto.
* libc/stdio/open_memstream.c (memwriter): Ditto.
* libc/stdio/stdio.c (__sread): Ditto.
(__seofread): Ditto.
(__swrite): Ditto.
* libc/stdio64/stdio64.c (__swrite64): Ditto.
Diffstat (limited to 'newlib/libc/stdio/stdio.c')
-rw-r--r-- | newlib/libc/stdio/stdio.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/newlib/libc/stdio/stdio.c b/newlib/libc/stdio/stdio.c index 31b787b..a6e28f5 100644 --- a/newlib/libc/stdio/stdio.c +++ b/newlib/libc/stdio/stdio.c @@ -34,10 +34,10 @@ _DEFUN(__sread, (ptr, cookie, buf, n), struct _reent *ptr _AND void *cookie _AND char *buf _AND - int n) + _READ_WRITE_BUFSIZE_TYPE n) { register FILE *fp = (FILE *) cookie; - register int ret; + register ssize_t ret; #ifdef __SCLE int oldmode = 0; @@ -67,7 +67,7 @@ _DEFUN(__seofread, (ptr, cookie, buf, len), struct _reent *_ptr _AND _PTR cookie _AND char *buf _AND - int len) + _READ_WRITE_BUFSIZE_TYPE len) { return 0; } @@ -77,10 +77,10 @@ _DEFUN(__swrite, (ptr, cookie, buf, n), struct _reent *ptr _AND void *cookie _AND char const *buf _AND - int n) + _READ_WRITE_BUFSIZE_TYPE n) { register FILE *fp = (FILE *) cookie; - int w; + ssize_t w; #ifdef __SCLE int oldmode=0; #endif |