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:
authorEric Blake <eblake@redhat.com>2007-07-14 00:37:53 +0400
committerEric Blake <eblake@redhat.com>2007-07-14 00:37:53 +0400
commit08146e5adbceb673cc2c6c4adee05ba37f709095 (patch)
tree2bda91075f62fa6b54750cca0346838ebf1a9f28 /newlib/libc/include/stdio.h
parentb71fb40215c79d607d8f24dc6af0c28d5ce9ccaf (diff)
Fix fflush issues.
* libc/stdio/fflush.c (_fflush_r): New function. (fflush): Fix reentrancy and large offset behavior. * libc/include/stdio.h (_fflush_r): Add prototype. * libc/stdio/fclose.c (_fclose_r): All fflush callers changed. * libc/stdio/freopen.c (_freopen_r): Likewise. * libc/stdio/fseek.c (_fseek_r): Likewise. * libc/stdio/ftell.c (_ftell_r): Likewise. * libc/stdio/fvwrite.c (__sfvwrite_r): Likewise. * libc/stdio/refill.c (__srefill_r): Likewise. * libc/stdio/setvbuf.c (setvbuf): Likewise. * libc/stdio/ungetc.c (_ungetc_r): Likewise. * libc/stdio/vfprintf.c (__sbprintf): Likewise. * libc/stdio/wbuf.c (__swbuf_r): Likewise. * libc/stdio64/freopen64.c (_freopen64_r): Likewise. * libc/stdio64/fseeko64.c (_fseeko64_r): Likewise. Defer to 32-bit version if not large file. * libc/stdio64/ftello64.c (_ftello64_r): Likewise. * libc/stdio64/tmpfile64.c (_tmpfile64_r): Avoid compile warning.
Diffstat (limited to 'newlib/libc/include/stdio.h')
-rw-r--r--newlib/libc/include/stdio.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h
index babb1c3c5..b387a4455 100644
--- a/newlib/libc/include/stdio.h
+++ b/newlib/libc/include/stdio.h
@@ -348,12 +348,13 @@ int _EXFUN(_dprintf_r, (struct _reent *, int, const char *, ...)
int _EXFUN(_fclose_r, (struct _reent *, FILE *));
int _EXFUN(_fcloseall_r, (struct _reent *));
FILE * _EXFUN(_fdopen_r, (struct _reent *, int, const char *));
-FILE * _EXFUN(_fopen_r, (struct _reent *, const char *, const char *));
+int _EXFUN(_fflush_r, (struct _reent *, FILE *));
char * _EXFUN(_fgets_r, (struct _reent *, char *, int, FILE *));
int _EXFUN(_fiprintf_r, (struct _reent *, FILE *, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4))));
int _EXFUN(_fiscanf_r, (struct _reent *, FILE *, const char *, ...)
_ATTRIBUTE ((__format__ (__scanf__, 3, 4))));
+FILE * _EXFUN(_fopen_r, (struct _reent *, const char *, const char *));
int _EXFUN(_fprintf_r, (struct _reent *, FILE *, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4))));
int _EXFUN(_fputc_r, (struct _reent *, int, FILE *));