summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads/sysdeps/pthread
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/linuxthreads/sysdeps/pthread')
-rw-r--r--libpthread/linuxthreads/sysdeps/pthread/bits/libc-tsd.h3
-rw-r--r--libpthread/linuxthreads/sysdeps/pthread/errno-loc.c6
-rw-r--r--libpthread/linuxthreads/sysdeps/pthread/herrno-loc.c4
-rw-r--r--libpthread/linuxthreads/sysdeps/pthread/res-state.c6
4 files changed, 9 insertions, 10 deletions
diff --git a/libpthread/linuxthreads/sysdeps/pthread/bits/libc-tsd.h b/libpthread/linuxthreads/sysdeps/pthread/bits/libc-tsd.h
index fa6eb4be2..6155280b1 100644
--- a/libpthread/linuxthreads/sysdeps/pthread/bits/libc-tsd.h
+++ b/libpthread/linuxthreads/sysdeps/pthread/bits/libc-tsd.h
@@ -21,10 +21,9 @@
#define _BITS_LIBC_TSD_H 1
#include <linuxthreads/descr.h>
+#ifdef __UCLIBC_HAS_TLS__
#include <tls.h>
-#if USE_TLS && HAVE___THREAD
-
/* When __thread works, the generic definition is what we want. */
# include <sysdeps/generic/bits/libc-tsd.h>
diff --git a/libpthread/linuxthreads/sysdeps/pthread/errno-loc.c b/libpthread/linuxthreads/sysdeps/pthread/errno-loc.c
index c3b3087e4..69352ea32 100644
--- a/libpthread/linuxthreads/sysdeps/pthread/errno-loc.c
+++ b/libpthread/linuxthreads/sysdeps/pthread/errno-loc.c
@@ -22,18 +22,18 @@
#include <linuxthreads/internals.h>
#include <sysdep-cancel.h>
-#if ! USE___THREAD && !RTLD_PRIVATE_ERRNO
+#if !defined __UCLIBC_HAS_TLS__ && !RTLD_PRIVATE_ERRNO
#undef errno
extern int errno;
#endif
int *
-#if ! USE___THREAD
+#ifndef __UCLIBC_HAS_TLS__
weak_const_function
#endif
__errno_location (void)
{
-#if ! USE___THREAD && !defined NOT_IN_libc
+#if !defined __UCLIBC_HAS_TLS__ && !defined NOT_IN_libc
if (! SINGLE_THREAD_P)
{
pthread_descr self = thread_self();
diff --git a/libpthread/linuxthreads/sysdeps/pthread/herrno-loc.c b/libpthread/linuxthreads/sysdeps/pthread/herrno-loc.c
index fbc557616..5a2657639 100644
--- a/libpthread/linuxthreads/sysdeps/pthread/herrno-loc.c
+++ b/libpthread/linuxthreads/sysdeps/pthread/herrno-loc.c
@@ -21,7 +21,7 @@
#include <linuxthreads/internals.h>
#include <sysdep-cancel.h>
-#if ! USE___THREAD
+#ifndef __UCLIBC_HAS_TLS__
# undef h_errno
extern int h_errno;
#endif
@@ -31,7 +31,7 @@ int *
weak_const_function
__h_errno_location (void)
{
-#if ! USE___THREAD
+#ifndef __UCLIBC_HAS_TLS__
if (! SINGLE_THREAD_P)
{
pthread_descr self = thread_self();
diff --git a/libpthread/linuxthreads/sysdeps/pthread/res-state.c b/libpthread/linuxthreads/sysdeps/pthread/res-state.c
index 016e20b4e..6eb77637b 100644
--- a/libpthread/linuxthreads/sysdeps/pthread/res-state.c
+++ b/libpthread/linuxthreads/sysdeps/pthread/res-state.c
@@ -21,19 +21,19 @@
#include <linuxthreads/internals.h>
#include <sysdep-cancel.h>
-#if ! USE___THREAD
+#ifndef __UCLIBC_HAS_TLS__
# undef _res
extern struct __res_state _res;
#endif
/* When threaded, _res may be a per-thread variable. */
struct __res_state *
-#if ! USE___THREAD
+#ifndef __UCLIBC_HAS_TLS__
weak_const_function
#endif
__res_state (void)
{
-#if ! USE___THREAD
+#ifndef __UCLIBC_HAS_TLS__
if (! SINGLE_THREAD_P)
{
pthread_descr self = thread_self();