Call _IO_cleanup_region_end with 0 and call _IO_funlockfile
authordrepper <drepper>
Sun, 7 Jun 1998 13:54:22 +0000 (13:54 +0000)
committerdrepper <drepper>
Sun, 7 Jun 1998 13:54:22 +0000 (13:54 +0000)
explicitly.

stdio-common/vfprintf.c
stdio-common/vfscanf.c

index 85558a1..a40acb7 100644 (file)
@@ -1472,7 +1472,12 @@ do_positional:
 
 all_done:
   /* Unlock the stream.  */
-  __libc_cleanup_region_end (1);
+#ifdef USE_IN_LIBIO
+  _IO_funlockfile (s);
+#else
+  __funlockfile (s);
+#endif
+  __libc_cleanup_region_end (0);
 
   return done;
 }
index 7666c87..c1ff269 100644 (file)
 # define LOCK_STREAM(S)                                                              \
   __libc_cleanup_region_start ((void (*) (void *)) &_IO_funlockfile, (S));    \
   _IO_flockfile (S)
-# define UNLOCK_STREAM __libc_cleanup_region_end (1)
+# define UNLOCK_STREAM(S)                                                    \
+  _IO_funlockfile (S);                                                       \
+  __libc_cleanup_region_end (0)
 #else
 # define ungetc(c, s)  ((void) (c != EOF && --read_in), ungetc (c, s))
 # define inchar()      (c == EOF ? EOF                                       \
 # define flockfile(S) /* nothing */
 # define funlockfile(S) /* nothing */
 # define LOCK_STREAM(S)
-# define UNLOCK_STREAM
+# define UNLOCK_STREAM(S)
 #else
 # define LOCK_STREAM(S)                                                              \
   __libc_cleanup_region_start (&__funlockfile, (S));                         \
   __flockfile (S)
-# define UNLOCK_STREAM __libc_cleanup_region_end (1)
+# define UNLOCK_STREAM(S)                                                    \
+  __funlockfile (S);                                                         \
+  __libc_cleanup_region_end (0)
 #endif
 #endif
 
@@ -1216,7 +1220,7 @@ __vfscanf (FILE *s, const char *format, va_list argptr)
     }
 
   /* Unlock stream.  */
-  UNLOCK_STREAM;
+  UNLOCK_STREAM (s);
 
   return done;
 }