From 5517266d33193ca13de097fa2775661c3bc6dac0 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 4 Aug 2002 03:25:12 +0000 Subject: 2002-08-02 Roland McGrath * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add _LIBC_TSD_KEY_LOCALE. * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]: Call __uselocale to initialize our per-thread locale pointer to the global one. * pthread.c (__pthread_initialize_minimal): Likewise. --- linuxthreads/pthread.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'linuxthreads/pthread.c') diff --git a/linuxthreads/pthread.c b/linuxthreads/pthread.c index a5fcbd8..ae42ebe 100644 --- a/linuxthreads/pthread.c +++ b/linuxthreads/pthread.c @@ -32,6 +32,7 @@ #include "restart.h" #include #include +#include /* for __uselocale */ /* Sanity check. */ #if __ASSUME_REALTIME_SIGNALS && !defined __SIGRTMIN @@ -460,6 +461,12 @@ __pthread_initialize_minimal(void) __pthread_initial_thread.p_cpuclock_offset = GL(dl_cpuclock_offset); # endif #endif + +#if !(USE_TLS && HAVE___THREAD) && defined SHARED + /* 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); +#endif } -- cgit v1.1