summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-01-31 22:32:17 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-01-31 22:32:17 +0000
commit167d569420c674556ca4e94937fbd4c104081085 (patch)
tree68ec92f752e66eabebdd3a51d1989eda4e453b39 /libpthread/linuxthreads
parent44d025b3b9f97f660bb2378a7a3801ed28d65e29 (diff)
pt-allocrtsig.c is irrelevant for now, remove related too, add libc_hidden_proto from old version
Diffstat (limited to 'libpthread/linuxthreads')
-rw-r--r--libpthread/linuxthreads/Makefile.in6
-rw-r--r--libpthread/linuxthreads/forward.c4
-rw-r--r--libpthread/linuxthreads/libc_pthread_init.c11
-rw-r--r--libpthread/linuxthreads/manager.c5
-rw-r--r--libpthread/linuxthreads/sysdeps/pthread/uClibc-glue.h8
5 files changed, 18 insertions, 16 deletions
diff --git a/libpthread/linuxthreads/Makefile.in b/libpthread/linuxthreads/Makefile.in
index abe59a881..2b6182dac 100644
--- a/libpthread/linuxthreads/Makefile.in
+++ b/libpthread/linuxthreads/Makefile.in
@@ -50,7 +50,6 @@ pthread_SRC := \
rwlock semaphore sighandler signals specific spinlock
pthread_SRC := $(patsubst %,$(libpthread_DIR)/%.c,$(pthread_SRC))
-#libpthread_shared_SRC := pt-allocrtsig
libpthread_static_SRC := pthread_atfork
libpthread_SRC := $(pthread_arch_SRC) $(pthread_linux_SRC) $(pthread_sysdep_SRC) $(pthread_SRC)
libpthread_OBJ := $(patsubst $(libpthread_DIR)/%.c,$(libpthread_OUT)/%.o,$(libpthread_SRC))
@@ -69,14 +68,13 @@ libc-static-y += $(libpthread_OUT)/libc_pthread_init.o
libc-shared-y += $(libpthread_libc_OBJ:.o=.oS)
libpthread-static-y += $(patsubst %,$(libpthread_OUT)/%.o,$(libpthread_static_SRC))
-libpthread-shared-y += $(patsubst %,$(libpthread_OUT)/%.oS,$(libpthread_shared_SRC))
ifeq ($(DOPIC),y)
libpthread-a-y += $(libpthread_OBJ:.o=.os) $(libpthread-static-y:.o=.os)
else
libpthread-a-y += $(libpthread_OBJ) $(libpthread-static-y)
endif
-libpthread-so-y += $(libpthread_OBJ:.o=.os) $(libpthread-shared-y)
+libpthread-so-y += $(libpthread_OBJ:.o=.os)
lib-a-$(UCLIBC_HAS_THREADS) += $(top_builddir)lib/libpthread.a
lib-so-$(UCLIBC_HAS_THREADS) += $(top_builddir)lib/libpthread.so
@@ -101,7 +99,7 @@ else
endif
$(do_ar)
-$(libpthread_OUT)/libpthread.oS: $(libpthread_SRC) $(patsubst %,$(libpthread_DIR)/%.c,$(libpthread_shared_SRC))
+$(libpthread_OUT)/libpthread.oS: $(libpthread_SRC)
$(Q)$(RM) $@
$(compile-m)
ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
diff --git a/libpthread/linuxthreads/forward.c b/libpthread/linuxthreads/forward.c
index bec2297be..96fef59e4 100644
--- a/libpthread/linuxthreads/forward.c
+++ b/libpthread/linuxthreads/forward.c
@@ -18,9 +18,11 @@
02111-1307 USA. */
#include <dlfcn.h>
-#include "internals.h"
#include <stdlib.h>
+/* psm: keep this before internals.h */
+libc_hidden_proto(exit)
+#include "internals.h"
/* Pointers to the libc functions. */
struct pthread_functions __libc_pthread_functions attribute_hidden;
diff --git a/libpthread/linuxthreads/libc_pthread_init.c b/libpthread/linuxthreads/libc_pthread_init.c
index b42751a2c..5a43eac04 100644
--- a/libpthread/linuxthreads/libc_pthread_init.c
+++ b/libpthread/linuxthreads/libc_pthread_init.c
@@ -25,6 +25,13 @@
#endif
#include "internals.h"
+#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)
const struct pthread_functions *functions;
@@ -37,10 +44,10 @@ __libc_pthread_init (functions)
sizeof (__libc_pthread_functions));
#endif
-#if !(USE_TLS && HAVE___THREAD)
+#if !(USE_TLS && HAVE___THREAD) && defined __UCLIBC_HAS_XLOCALE__
/* 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 d854610db..444c48169 100644
--- a/libpthread/linuxthreads/manager.c
+++ b/libpthread/linuxthreads/manager.c
@@ -38,6 +38,9 @@
#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;
@@ -291,7 +294,7 @@ pthread_start_thread(void *arg)
__sched_setscheduler(THREAD_GETMEM(self, p_pid),
SCHED_OTHER, &default_params);
}
-#if !(USE_TLS && HAVE___THREAD)
+#if !(USE_TLS && HAVE___THREAD) && defined __UCLIBC_HAS_XLOCALE__
/* 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/libpthread/linuxthreads/sysdeps/pthread/uClibc-glue.h b/libpthread/linuxthreads/sysdeps/pthread/uClibc-glue.h
index 51162b95e..094c7fccf 100644
--- a/libpthread/linuxthreads/sysdeps/pthread/uClibc-glue.h
+++ b/libpthread/linuxthreads/sysdeps/pthread/uClibc-glue.h
@@ -8,18 +8,10 @@
#ifdef IS_IN_libpthread
#include "kernel-features.h"
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
-#endif
-
#ifndef __GLIBC_HAVE_LONG_LONG
# define __GLIBC_HAVE_LONG_LONG
#endif
-#ifndef __UCLIBC_HAS_XLOCALE__
-# define __uselocale(x)
-#endif
-
#define __getpagesize getpagesize
#define __sched_get_priority_max sched_get_priority_max
#define __sched_get_priority_min sched_get_priority_min