summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Rules.mak4
-rw-r--r--extra/Configs/Config.in4
-rw-r--r--include/netdb.h4
-rw-r--r--include/resolv.h2
-rw-r--r--include/time.h2
-rw-r--r--ldso/include/ldso.h2
-rw-r--r--ldso/ldso/Makefile4
-rw-r--r--ldso/libdl/Makefile2
-rw-r--r--libc/inet/resolv.c2
-rw-r--r--libc/inet/rpc/rpc_thread.c4
-rw-r--r--libc/misc/internals/errno.c2
-rw-r--r--libc/stdio/Makefile2
-rw-r--r--libc/stdlib/malloc-standard/Makefile2
-rw-r--r--libc/sysdeps/linux/alpha/Makefile4
-rw-r--r--libc/sysdeps/linux/mips/__syscall_error.c2
-rw-r--r--libpthread/Makefile10
16 files changed, 26 insertions, 26 deletions
diff --git a/Rules.mak b/Rules.mak
index d5c10f79d..0bcd0c452 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -309,7 +309,7 @@ endif
#
# Thread includes are needed to compile some files.
#
-ifeq ($(PTHREADS_NATIVE),y)
+ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
PTDIR := $(TOPDIR)libpthread/nptl/
PTINC := -I$(PTDIR)compat \
-I$(PTDIR)sysdeps/unix/sysv/linux/$(TARGET_ARCH) \
@@ -335,7 +335,7 @@ PTCOBJSH := $(TOPDIR)libc/obj-pthread-libc_shared
#
# Test for TLS if NPTL support was selected.
#
-ifeq ($(PTHREADS_NATIVE),y)
+ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
GCC_HAS_TLS=$(shell \
echo "extern __thread int foo;" | $(CC) -o /dev/null -S -xc - 2>&1)
ifneq ($(GCC_HAS_TLS),)
diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in
index 036a48b33..1b409cba4 100644
--- a/extra/Configs/Config.in
+++ b/extra/Configs/Config.in
@@ -310,7 +310,7 @@ config UCLIBC_HAS_THREADS
If your applications require pthreads, answer Y.
-config PTHREADS_NATIVE
+config UCLIBC_HAS_THREADS_NATIVE
bool "Native POSIX Threading (NPTL) Support"
depends on UCLIBC_HAS_THREADS
default n
@@ -1035,7 +1035,7 @@ config UCLIBC_HAS_GNU_GETOPT
config UCLIBC_HAS_STDIO_FUTEXES
bool "Use futexes for multithreaded I/O locking"
default y
- depends on PTHREADS_NATIVE
+ depends on UCLIBC_HAS_THREADS_NATIVE
help
If you want to compile uClibc to use futexes for low-level
I/O locking, answer Y. Otherwise, answer N.
diff --git a/include/netdb.h b/include/netdb.h
index 24c99f079..99532d76d 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -57,7 +57,7 @@ __BEGIN_DECLS
We use a macro to access always the thread-specific `h_errno' variable.
We always need the extern int here in case internal libc code undefines
the macro because it needs access to the underlying storage. */
-#if !defined(__PTHREADS_NATIVE__)
+#if !defined(__UCLIBC_HAS_THREADS_NATIVE__)
extern int h_errno;
#endif
#if defined(__UCLIBC_HAS_THREADS__)
@@ -658,7 +658,7 @@ extern int getnameinfo (__const struct sockaddr *__restrict __sa,
__END_DECLS
#ifdef _LIBC
-# ifdef __PTHREADS_NATIVE__
+# ifdef __UCLIBC_HAS_THREADS_NATIVE__
# include <tls.h>
# undef h_errno
# define h_errno h_errno /* For #ifndef h_errno tests. */
diff --git a/include/resolv.h b/include/resolv.h
index 1f0aea0be..882c4e9ae 100644
--- a/include/resolv.h
+++ b/include/resolv.h
@@ -389,7 +389,7 @@ __END_DECLS
#endif /* _RESOLV_H_ */
-#if defined(__PTHREADS_NATIVE__) && defined(IS_IN_libpthread)
+#if defined(__UCLIBC_HAS_THREADS_NATIVE__) && defined(IS_IN_libpthread)
# include <tls.h>
# undef _res
# define _res (*__resp)
diff --git a/include/time.h b/include/time.h
index 7f6eb60e8..376fe3754 100644
--- a/include/time.h
+++ b/include/time.h
@@ -191,7 +191,7 @@ extern double difftime (time_t __time1, time_t __time0)
__THROW __attribute__ ((__const__));
#endif /* __UCLIBC_HAS_FLOATS__ */
-#ifdef __PTHREADS_NATIVE__
+#ifdef __UCLIBC_HAS_THREADS_NATIVE__
# define CLOCK_IDFIELD_SIZE 3
#endif
diff --git a/ldso/include/ldso.h b/ldso/include/ldso.h
index 83485608e..95635c3d5 100644
--- a/ldso/include/ldso.h
+++ b/ldso/include/ldso.h
@@ -32,7 +32,7 @@
#include <dl-elf.h>
#include <dl-hash.h>
/* Defines USE_TLS */
-#if defined(__PTHREADS_NATIVE__)
+#ifdef __UCLIBC_HAS_THREADS_NATIVE__
#include <tls.h>
#endif
diff --git a/ldso/ldso/Makefile b/ldso/ldso/Makefile
index 3ca9b731f..a2b255b95 100644
--- a/ldso/ldso/Makefile
+++ b/ldso/ldso/Makefile
@@ -37,7 +37,7 @@ XXFLAGS+=-Os -g
else
XXFLAGS+=$(OPTIMIZATION)
endif
-ifeq ($(PTHREADS_NATIVE),y)
+ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
XXFLAGS+= -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" $(XARCH_CFLAGS) $(CPU_CFLAGS) $(PICFLAG) \
-DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \
-fno-builtin -nostdinc -D_LIBC -I$(TOPDIR)ldso/include -I. -I$(TOPDIR)include $(PTINC) -DSHARED -DIS_IN_rtld
@@ -79,7 +79,7 @@ XXFLAGS := $(XXFLAGS:-fomit-frame-pointer=)
all: $(LDSO_FULLNAME)
-ifeq ($(PTHREADS_NATIVE),y)
+ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
$(LDSO_FULLNAME): dl-tls.c $(OBJS) $(DLINK_OBJS)
else
$(LDSO_FULLNAME): $(OBJS) $(DLINK_OBJS)
diff --git a/ldso/libdl/Makefile b/ldso/libdl/Makefile
index f4dbf105a..17ec3f30d 100644
--- a/ldso/libdl/Makefile
+++ b/ldso/libdl/Makefile
@@ -27,7 +27,7 @@ XXFLAGS+=-O0 -g3
else
XXFLAGS+=$(OPTIMIZATION)
endif
-ifeq ($(PTHREADS_NATIVE),y)
+ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
XXFLAGS+= $(XARCH_CFLAGS) $(CPU_CFLAGS) \
-DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \
-fno-builtin -nostdinc -D_LIBC -I$(TOPDIR)ldso/include -I$(TOPDIR)ldso/ldso -I. -I$(TOPDIR)include $(PTINC) -DIS_IN_rtld
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c
index bb188b959..0c73fcab3 100644
--- a/libc/inet/resolv.c
+++ b/libc/inet/resolv.c
@@ -1104,7 +1104,7 @@ struct __res_state * weak_const_function __res_state (void)
return &_res;
}
-#ifdef __PTHREADS_NATIVE__
+#ifdef __UCLIBC_HAS_THREADS_NATIVE__
#include <tls.h>
__thread struct __res_state *__resp = &_res;
#endif
diff --git a/libc/inet/rpc/rpc_thread.c b/libc/inet/rpc/rpc_thread.c
index be820599b..e3a1c40b2 100644
--- a/libc/inet/rpc/rpc_thread.c
+++ b/libc/inet/rpc/rpc_thread.c
@@ -9,7 +9,7 @@
/* Variable used in non-threaded applications or for the first thread. */
static struct rpc_thread_variables __libc_tsd_RPC_VARS_mem;
-#ifdef __PTHREADS_NATIVE__
+#ifdef __UCLIBC_HAS_THREADS_NATIVE__
static struct rpc_thread_variables *__libc_tsd_RPC_VARS =
&__libc_tsd_RPC_VARS_mem;
#else
@@ -82,7 +82,7 @@ __rpc_thread_variables (void)
if (tvp != NULL)
__libc_tsd_set (RPC_VARS, tvp);
else
-#ifdef __PTHREADS_NATIVE__
+#ifdef __UCLIBC_HAS_THREADS_NATIVE__
tvp = __libc_tsd_RPC_VARS;
#else
tvp = __libc_tsd_RPC_VARS_data;
diff --git a/libc/misc/internals/errno.c b/libc/misc/internals/errno.c
index 5197e0aec..05acb7ea9 100644
--- a/libc/misc/internals/errno.c
+++ b/libc/misc/internals/errno.c
@@ -1,7 +1,7 @@
#include <features.h>
#undef errno
-#if __PTHREADS_NATIVE__
+#ifdef __UCLIBC_HAS_THREADS_NATIVE__
#include <tls.h>
extern int errno;
extern __thread int _h_errno;
diff --git a/libc/stdio/Makefile b/libc/stdio/Makefile
index 6e1a95f2f..dc2a29173 100644
--- a/libc/stdio/Makefile
+++ b/libc/stdio/Makefile
@@ -59,7 +59,7 @@ endif
# pthread functions
CSRC += flockfile.c ftrylockfile.c funlockfile.c
-ifeq ($(strip $(PTHREADS_NATIVE)),y)
+ifeq ($(strip $(UCLIBC_HAS_THREADS_NATIVE)),y)
CSRC += fatal.c
endif
diff --git a/libc/stdlib/malloc-standard/Makefile b/libc/stdlib/malloc-standard/Makefile
index 28f67b058..acd7526e9 100644
--- a/libc/stdlib/malloc-standard/Makefile
+++ b/libc/stdlib/malloc-standard/Makefile
@@ -32,7 +32,7 @@ endif
# calloc.c can be found at uClibc/libc/stdlib/calloc.c
# valloc.c can be found at uClibc/libc/stdlib/valloc.c
CSRC=malloc.c calloc.c realloc.c free.c memalign.c mallopt.c mallinfo.c
-ifeq ($(PTHREADS_NATIVE),y)
+ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
CSRC += thread-freeres.c
endif
COBJS=$(patsubst %.c,%.o, $(CSRC))
diff --git a/libc/sysdeps/linux/alpha/Makefile b/libc/sysdeps/linux/alpha/Makefile
index 45e2ece62..ffb075b1a 100644
--- a/libc/sysdeps/linux/alpha/Makefile
+++ b/libc/sysdeps/linux/alpha/Makefile
@@ -32,7 +32,7 @@ COBJS=$(patsubst %.c,%.o, $(CSRC))
OBJS=$(SOBJS) $(COBJS)
-ifeq ($(PTHREADS_NATIVE),y)
+ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
COBJS += $(PTDIR)sysdeps/$(TARGET_ARCH)/libc-tls.o
endif
@@ -80,7 +80,7 @@ $(TOPDIR)lib/crtn.o:
$(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
endif
-ifeq ($(PTHREADS_NATIVE),y)
+ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
$(PTDIR)sysdeps/$(TARGET_ARCH)/libc-tls.o:
$(MAKE) -C $(PTDIR)sysdeps/$(TARGET_ARCH) libc-tls.o
endif
diff --git a/libc/sysdeps/linux/mips/__syscall_error.c b/libc/sysdeps/linux/mips/__syscall_error.c
index 05dcacc8b..6ece361f3 100644
--- a/libc/sysdeps/linux/mips/__syscall_error.c
+++ b/libc/sysdeps/linux/mips/__syscall_error.c
@@ -22,7 +22,7 @@
/* This routine is jumped to by all the syscall handlers, to stash
* an error number into errno. */
-#ifdef __PTHREADS_NATIVE__
+#ifdef __UCLIBC_HAS_THREADS_NATIVE__
int __syscall_error(int err_no)
#else
int attribute_hidden __syscall_error(int err_no)
diff --git a/libpthread/Makefile b/libpthread/Makefile
index 66f8cc507..4b57ab32f 100644
--- a/libpthread/Makefile
+++ b/libpthread/Makefile
@@ -18,7 +18,7 @@
TOPDIR=../
include $(TOPDIR)Rules.mak
-ifeq ($(strip $(PTHREADS_NATIVE)),y)
+ifeq ($(strip $(UCLIBC_HAS_THREADS_NATIVE)),y)
include nptl/Rules.mak
endif
@@ -35,7 +35,7 @@ LIBTHREAD_DB_SHARED=libthread_db.so
LIBTHREAD_DB_SHARED_FULLNAME=libthread_db-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
DIRS=
-ifeq ($(strip $(PTHREADS_NATIVE)),y)
+ifeq ($(strip $(UCLIBC_HAS_THREADS_NATIVE)),y)
DIRS+=nptl
ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
DIRS+=nptl_db
@@ -52,7 +52,7 @@ ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
SHARED_END_FILES = $(LIBGCC_DIR)crtendS.o $(TOPDIR)lib/crtn.o
endif
-ifeq ($(strip $(PTHREADS_NATIVE)),y)
+ifeq ($(strip $(UCLIBC_HAS_THREADS_NATIVE)),y)
ALL_SUBDIRS = nptl nptl_db
else
ALL_SUBDIRS = linuxthreads linuxthreads_db
@@ -93,7 +93,7 @@ ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
endif
objs-pthread-libc:
-ifeq ($(strip $(PTHREADS_NATIVE)),y)
+ifeq ($(strip $(UCLIBC_HAS_THREADS_NATIVE)),y)
$(MAKE) -C nptl $@
else
touch $(PTCOBJST) $(PTCOBJSH)
@@ -105,7 +105,7 @@ $(OBJS): %.o : %.c
$(STRIPTOOL) -x -R .note -R .comment $*.o
shared: all
-ifeq ($(strip $(PTHREADS_NATIVE)),y)
+ifeq ($(strip $(UCLIBC_HAS_THREADS_NATIVE)),y)
$(LD) $(LDFLAGS_NOSTRIP) -soname=$(LIBPTHREAD_SHARED).$(MAJOR_VERSION) \
-o $(LIBPTHREAD_SHARED_FULLNAME) $(SHARED_START_FILES) --whole-archive $(LIBPTHREAD_SHARED_ARCHIVE) \
--no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \