From ae2ddc98c17c17897398c8d960d984789ecab0d9 Mon Sep 17 00:00:00 2001 From: "Thomas Bushnell, BSG" Date: Thu, 12 Sep 1996 22:22:29 +0000 Subject: *** empty log message *** (vfprintf): Only call __libc_cleanup_region_end if USE_IN_LIBIO, thus matching the sense of the tests around __libc_cleanup_region_start at the front of the function. * stdio-common/vfscanf.c: Include . (UNLOCK_STREAM) [! USE_IN_LIBIO]: Call __libc_cleanup_region_end, not __libc_cleanup_region_start. --- stdio-common/vfprintf.c | 3 +++ stdio-common/vfscanf.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'stdio-common') diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c index d27bbdbf57..dc2983d264 100644 --- a/stdio-common/vfprintf.c +++ b/stdio-common/vfprintf.c @@ -1311,7 +1311,10 @@ do_positional: all_done: /* Unlock the stream. */ +#ifdef USE_IN_LIBIO + /* (stdio has no locking yet.) */ __libc_cleanup_region_end (1); +#endif return done; } diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c index 903f5849cc..f83fd281a1 100644 --- a/stdio-common/vfscanf.c +++ b/stdio-common/vfscanf.c @@ -24,6 +24,7 @@ Cambridge, MA 02139, USA. */ #include #include #include +#include #ifdef __GNUC__ #define HAVE_LONGLONG @@ -119,7 +120,7 @@ Cambridge, MA 02139, USA. */ # define LOCK_STREAM(S) \ __libc_cleanup_region_start (&__funlockfile, (S)); \ __flockfile (S) -# define UNLOCK_STREAM __libc_cleanup_region_start (1) +# define UNLOCK_STREAM __libc_cleanup_region_end (1) #endif #endif -- cgit 1.4.1