From 562f681d63d5b2b4a06db8b2378cdef45c7594e4 Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Tue, 26 Nov 2002 17:50:48 +0000 Subject: 2002-11-26 Neal H. Walfield * pthread/pt-create.c [HAVE_USELOCAL]: Include . (entry_point) [HAVE_USELOCALE]: Initialize the thread to the global locale. --- pthread/pt-create.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'pthread/pt-create.c') diff --git a/pthread/pt-create.c b/pthread/pt-create.c index bbfc660..0295a0a 100644 --- a/pthread/pt-create.c +++ b/pthread/pt-create.c @@ -26,6 +26,10 @@ #include +#ifdef HAVE_USELOCALE +# include +#endif + /* The total number of pthreads currently active. This is defined here since it would be really stupid to have a threads-using program that doesn't call `pthread_create'. */ @@ -36,6 +40,11 @@ __atomic_t __pthread_total; static void entry_point (void *(*start_routine)(void *), void *arg) { +#ifdef HAVE_USELOCALE + /* A fresh thread needs to be bound to the global locale. */ + uselocale (LC_GLOBAL_LOCALE); +#endif + pthread_exit (start_routine (arg)); } -- cgit v1.2.3