[uClibc-cvs] uClibc/libc/misc/wchar wstdio.c,1.4,1.5

Manuel Novoa III mjn3 at uclibc.org
Sat Dec 27 23:30:41 UTC 2003


Update of /var/cvs/uClibc/libc/misc/wchar
In directory nail:/tmp/cvs-serv11655/libc/misc/wchar

Modified Files:
	wstdio.c 
Log Message:
Fix a long-standing bug with pthreads.  A couple of linuxthreads files
were including libc-lock.h which had a bunch of weak pragmas.  Also,
uClibc supplied a number of no-op weak thread functions even though
many weren't needed.  This combined result was that sometimes the
functional versions of thread functions in pthread would not override
the weaks in libc.

While fixing this, I also prepended double-underscore to all necessary
weak thread funcs in uClibc, and removed all unused weaks.

I did a test build, but haven't tested this since these changes are
a backport from my working tree.  I did test the changes there and
no longer need to explicitly add -lpthread in the perl build for
perl to pass its thread self tests.



Index: wstdio.c
===================================================================
RCS file: /var/cvs/uClibc/libc/misc/wchar/wstdio.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- wstdio.c	1 Aug 2003 20:08:51 -0000	1.4
+++ wstdio.c	27 Dec 2003 23:30:37 -0000	1.5
@@ -113,13 +113,13 @@
 void NAME##_unlocked PARAMS
 
 #define __STDIO_THREADLOCK_OPENLIST \
-	pthread_mutex_lock(&_stdio_openlist_lock)
+	__pthread_mutex_lock(&_stdio_openlist_lock)
 
 #define __STDIO_THREADUNLOCK_OPENLIST \
-	pthread_mutex_unlock(&_stdio_openlist_lock)
+	__pthread_mutex_unlock(&_stdio_openlist_lock)
 
 #define __STDIO_THREADTRYLOCK_OPENLIST \
-	pthread_mutex_trylock(&_stdio_openlist_lock)
+	__pthread_mutex_trylock(&_stdio_openlist_lock)
 
 #endif /* __STDIO_THREADSAFE */
 




More information about the uClibc-cvs mailing list