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/printf.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/printf.c')
-rw-r--r-- | libc/stdio/printf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libc/stdio/printf.c b/libc/stdio/printf.c index 47c11c6bf..365cd41a2 100644 --- a/libc/stdio/printf.c +++ b/libc/stdio/printf.c @@ -61,6 +61,7 @@ #include <printf.h> #ifdef __STDIO_THREADSAFE +#include <stdio_ext.h> #include <pthread.h> #endif /* __STDIO_THREADSAFE */ @@ -1313,6 +1314,7 @@ int vsnprintf(char *__restrict buf, size_t size, #endif /* __STDIO_MBSTATE */ #ifdef __STDIO_THREADSAFE + f.user_locking = 0; __stdio_init_mutex(&f.lock); #endif @@ -1392,6 +1394,7 @@ int vsnprintf(char *__restrict buf, size_t size, #endif /* __STDIO_MBSTATE */ #ifdef __STDIO_THREADSAFE + f.user_locking = 0; __stdio_init_mutex(&f.lock); #endif @@ -1439,6 +1442,7 @@ int vdprintf(int filedes, const char * __restrict format, va_list arg) #endif /* __STDIO_MBSTATE */ #ifdef __STDIO_THREADSAFE + f.user_locking = 0; __stdio_init_mutex(&f.lock); #endif |