diff options
author | Neal H. Walfield <neal@gnu.org> | 2002-11-26 17:50:48 +0000 |
---|---|---|
committer | Neal H. Walfield <neal@gnu.org> | 2002-11-26 17:50:48 +0000 |
commit | 562f681d63d5b2b4a06db8b2378cdef45c7594e4 (patch) | |
tree | 444d4184b4058ed33a210361c81ea020e90ab953 /pthread/pt-create.c | |
parent | 96f08e93f5cc18de5877bc1700e46b805cb86a78 (diff) |
2002-11-26 Neal H. Walfield <neal@cs.uml.edu>
* pthread/pt-create.c [HAVE_USELOCAL]: Include <locale.h>.
(entry_point) [HAVE_USELOCALE]: Initialize the thread to the
global locale.
Diffstat (limited to 'pthread/pt-create.c')
-rw-r--r-- | pthread/pt-create.c | 9 |
1 files changed, 9 insertions, 0 deletions
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 <pt-internal.h> +#ifdef HAVE_USELOCALE +# include <locale.h> +#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)); } |