diff options
author | Manuel Novoa III <mjn3@codepoet.org> | 2002-08-13 21:24:56 +0000 |
---|---|---|
committer | Manuel Novoa III <mjn3@codepoet.org> | 2002-08-13 21:24:56 +0000 |
commit | a70b1b9b0e7736ff743113fa1d8c4bafcb30b2ec (patch) | |
tree | 1cb55f59b823a64cdfeddd711d0ef0fecece692d /libc/stdio/scanf.c | |
parent | 9ae5b8eb0033243f79a00bf253ede3fb2d510cf3 (diff) |
__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.
Diffstat (limited to 'libc/stdio/scanf.c')
-rw-r--r-- | libc/stdio/scanf.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 <stdarg.h> #ifdef __STDIO_THREADSAFE +#include <stdio_ext.h> #include <pthread.h> #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 |