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/printf.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libc/stdio/printf.c') 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 #ifdef __STDIO_THREADSAFE +#include #include #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 -- cgit v1.2.3