From a70b1b9b0e7736ff743113fa1d8c4bafcb30b2ec Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Tue, 13 Aug 2002 21:24:56 +0000 Subject: __fsetlocking() and FILE field user_locking were completely broken. :-( I think they're fixed now (I've run a few tests). Note: __fsetlocking() is not threadsafe... but glibc's doesn't appear to be either. --- libc/stdio/scanf.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libc/stdio/scanf.c') diff --git a/libc/stdio/scanf.c b/libc/stdio/scanf.c index 6d7a84e57..f392fe790 100644 --- a/libc/stdio/scanf.c +++ b/libc/stdio/scanf.c @@ -42,6 +42,7 @@ #include #ifdef __STDIO_THREADSAFE +#include #include #endif /* __STDIO_THREADSAFE */ @@ -128,6 +129,7 @@ int vsscanf(__const char *sp, __const char *fmt, va_list ap) #endif /* __STDIO_MBSTATE */ #ifdef __STDIO_THREADSAFE + string->user_locking = 0; __stdio_init_mutex(&string->lock); #endif -- cgit v1.2.3