From 628a0aa1523e7160dac986d7988fcc08375cfd88 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 1 Dec 1998 19:35:00 +0000 Subject: Update. 1998-11-29 1998 H.J. Lu * libio/genops.c (_IO_unbuffer_write): Renamed from _IO_unbuffer_all. (_IO_cleanup): Call _IO_unbuffer_write instead of _IO_unbuffer_all. 1998-12-01 Ulrich Drepper * intl/localealias.c: Use *_unlocked version of stdio function if _LIBC_REENTRANT is defined, not _LIBC. 1998-12-01 Andreas Jaeger * include/grp.h: Add prototypes for internal functions __getgrgid_r and __getgrnam_r. * inet/herrno.c: Include for prototype, undef h_errno. * resolv/nsap_addr.c: Include for inet_nsap_addr and inet_nsap_ntoa prototypes. * sysdeps/unix/sysv/linux/Makefile (syscall-%.h): Pass -I option to gcc to have it find the correct system header. Patch by Maciej W. Rozycki . Reported by Maciej W. Rozycki . --- libio/genops.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'libio/genops.c') diff --git a/libio/genops.c b/libio/genops.c index 6f560de..30bceb6 100644 --- a/libio/genops.c +++ b/libio/genops.c @@ -705,14 +705,16 @@ _IO_flush_all_linebuffered () _IO_OVERFLOW (fp, EOF); } -static void _IO_unbuffer_all __P ((void)); +static void _IO_unbuffer_write __P ((void)); static void -_IO_unbuffer_all () +_IO_unbuffer_write () { _IO_FILE *fp; for (fp = _IO_list_all; fp != NULL; fp = fp->_chain) - if (! (fp->_flags & _IO_UNBUFFERED)) + if (! (fp->_flags & _IO_UNBUFFERED) + && (! (fp->_flags & _IO_NO_WRITES) + || (fp->_flags & _IO_IS_APPENDING))) _IO_SETBUF (fp, NULL, 0); } @@ -728,7 +730,7 @@ _IO_cleanup () The following will make the standard streambufs be unbuffered, which forces any output from late destructors to be written out. */ - _IO_unbuffer_all (); + _IO_unbuffer_write (); return result; } -- cgit v1.1