From 95ed9d843825518c57cedc32476f5be4b2675b3e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 30 Aug 2002 22:07:28 +0000 Subject: * locale/duplocale.c: Include . --- linuxthreads/ChangeLog | 10 ++++++++++ linuxthreads/Makefile | 4 ++-- linuxthreads/pthread.c | 2 +- linuxthreads/tst-static-locale.c | 13 +++++++++++++ 4 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 linuxthreads/tst-static-locale.c (limited to 'linuxthreads') diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 93193ae754..ec9befe04b 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,13 @@ +2002-08-30 Jakub Jelinek + + * pthread.c (__pthread_initialize_minimal): Call __uselocale even + if [! SHARED]. + +2002-08-30 Roland McGrath + + * tst-static-locale.c: New file. + * Makefile (tests, tests-static): Add it. + 2002-04-24 Steven Munroe * spinlock.c (__pthread_lock): Fix spurious wakeup diff --git a/linuxthreads/Makefile b/linuxthreads/Makefile index ba4327921a..4f94de373e 100644 --- a/linuxthreads/Makefile +++ b/linuxthreads/Makefile @@ -65,8 +65,8 @@ tests = ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9 $(librt-tests) ex12 ex13 joinrace \ test-srcs = tst-signal ifeq ($(build-static),yes) -tests += tststatic -tests-static += tststatic +tests += tststatic tst-static-locale +tests-static += tststatic tst-static-locale endif ifeq (yes,$(build-shared)) diff --git a/linuxthreads/pthread.c b/linuxthreads/pthread.c index ae40254982..f08bfd4652 100644 --- a/linuxthreads/pthread.c +++ b/linuxthreads/pthread.c @@ -479,7 +479,7 @@ __pthread_initialize_minimal(void) # endif #endif -#if !(USE_TLS && HAVE___THREAD) && defined SHARED +#if !(USE_TLS && HAVE___THREAD) /* Initialize thread-locale current locale to point to the global one. With __thread support, the variable's initializer takes care of this. */ __uselocale (LC_GLOBAL_LOCALE); diff --git a/linuxthreads/tst-static-locale.c b/linuxthreads/tst-static-locale.c new file mode 100644 index 0000000000..3c88e729ba --- /dev/null +++ b/linuxthreads/tst-static-locale.c @@ -0,0 +1,13 @@ +/* Test that the thread-local locale works right in the main thread + when statically linked. */ + +#include "../locale/tst-C-locale.c" + +#include + +/* This is never called, just here to get pthreads linked in. */ +void +useless (void) +{ + pthread_create (0, 0, 0, 0); +} -- cgit v1.2.3