summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-03-09 14:53:12 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-03-09 14:53:12 +0000
commit55628cb04c5daec6016f9621f31ee853ceed6986 (patch)
tree595b8ee992ed92fddfca466af66d928a1b49daea
parentd0a847fd8a6f89095b20c44fac4f28530481a567 (diff)
Move __clone/__uselocale to uClibc_glue.h
-rw-r--r--libpthread/linuxthreads/libc_pthread_init.c7
-rw-r--r--libpthread/linuxthreads/manager.c7
-rw-r--r--libpthread/linuxthreads/sysdeps/pthread/uClibc-glue.h8
3 files changed, 10 insertions, 12 deletions
diff --git a/libpthread/linuxthreads/libc_pthread_init.c b/libpthread/linuxthreads/libc_pthread_init.c
index 5a43eac04..5ed9ab6bf 100644
--- a/libpthread/linuxthreads/libc_pthread_init.c
+++ b/libpthread/linuxthreads/libc_pthread_init.c
@@ -28,9 +28,6 @@
#ifdef SHARED
libc_hidden_proto(memcpy)
#endif
-#if !(USE_TLS && HAVE___THREAD) && defined __UCLIBC_HAS_XLOCALE__
-libc_hidden_proto(uselocale)
-#endif
int *
__libc_pthread_init (functions)
@@ -44,10 +41,10 @@ __libc_pthread_init (functions)
sizeof (__libc_pthread_functions));
#endif
-#if !(USE_TLS && HAVE___THREAD) && defined __UCLIBC_HAS_XLOCALE__
+#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);
+ __uselocale (LC_GLOBAL_LOCALE);
#endif
return &__libc_multiple_threads;
diff --git a/libpthread/linuxthreads/manager.c b/libpthread/linuxthreads/manager.c
index 42912edb7..bbdbd59a0 100644
--- a/libpthread/linuxthreads/manager.c
+++ b/libpthread/linuxthreads/manager.c
@@ -37,11 +37,6 @@
#include "semaphore.h"
#include <not-cancel.h>
-#define __clone clone
-#if !(USE_TLS && HAVE___THREAD) && defined __UCLIBC_HAS_XLOCALE__
-#define __uselocale(x) uselocale(x)
-#endif
-
/* For debugging purposes put the maximum number of threads in a variable. */
const int __linuxthreads_pthread_threads_max = PTHREAD_THREADS_MAX;
@@ -297,9 +292,7 @@ pthread_start_thread(void *arg)
#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. */
-#ifdef __UCLIBC_HAS_XLOCALE__
__uselocale (LC_GLOBAL_LOCALE);
-#endif
#else
/* Initialize __resp. */
__resp = &self->p_res;
diff --git a/libpthread/linuxthreads/sysdeps/pthread/uClibc-glue.h b/libpthread/linuxthreads/sysdeps/pthread/uClibc-glue.h
index 094c7fccf..5a72b7703 100644
--- a/libpthread/linuxthreads/sysdeps/pthread/uClibc-glue.h
+++ b/libpthread/linuxthreads/sysdeps/pthread/uClibc-glue.h
@@ -27,12 +27,20 @@
#define __close close
#define __on_exit on_exit
#define __libc_current_sigrtmin_private __libc_current_sigrtmin
+#define __clone clone
extern void *__libc_stack_end;
extern int __cxa_atexit (void (*func) (void *), void *arg, void *d);
#endif /* IS_IN_libpthread */
+#ifdef __UCLIBC_HAS_XLOCALE__
+# define __uselocale(x) uselocale(x)
+libc_hidden_proto(uselocale)
+#else
+# define __uselocale(x) ((void)0)
+#endif
+
/* Use a funky version in a probably vein attempt at preventing gdb
* from dlopen()'ing glibc's libthread_db library... */
#define STRINGIFY(s) STRINGIFY2 (s)