about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--linuxthreads/Makefile2
-rw-r--r--linuxthreads/sysdeps/i386/i686/pt-machine.h6
-rw-r--r--linuxthreads/sysdeps/i386/tls.h4
3 files changed, 7 insertions, 5 deletions
diff --git a/linuxthreads/Makefile b/linuxthreads/Makefile
index a16ae8d2da..a6689bb4a0 100644
--- a/linuxthreads/Makefile
+++ b/linuxthreads/Makefile
@@ -65,6 +65,8 @@ libpthread-static-only-routines = pthread_atfork
 
 libpthread-nonshared = pthread_atfork
 
+linuxthreads-CPPFLAGS = -DIS_IN_linuxthreads=1
+
 CFLAGS-pthread_atfork.c = -DNOT_IN_libc
 
 nodelete-yes = -Wl,--enable-new-dtags,-z,nodelete
diff --git a/linuxthreads/sysdeps/i386/i686/pt-machine.h b/linuxthreads/sysdeps/i386/i686/pt-machine.h
index 7b4ff92383..1c75bf9807 100644
--- a/linuxthreads/sysdeps/i386/i686/pt-machine.h
+++ b/linuxthreads/sysdeps/i386/i686/pt-machine.h
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    i686 version.
-   Copyright (C) 1996-2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <rth@tamu.edu>.
 
@@ -69,9 +69,7 @@ __compare_and_swap (long int *p, long int oldval, long int newval)
 }
 #endif
 
-/* If tls.h was included, it will include useldt.h after defining USE_TLS.
-   We don't want to include it here first when tls.h includes us.  */
-#if __ASSUME_LDT_WORKS > 0 && !defined _TLS_H
+#if __ASSUME_LDT_WORKS > 0
 #include "../useldt.h"
 #endif
 
diff --git a/linuxthreads/sysdeps/i386/tls.h b/linuxthreads/sysdeps/i386/tls.h
index b1805cb868..5306d082bb 100644
--- a/linuxthreads/sysdeps/i386/tls.h
+++ b/linuxthreads/sysdeps/i386/tls.h
@@ -113,7 +113,9 @@ typedef struct
 #   define TLS_LOAD_EBX
 #  endif
 
-#  include "useldt.h"		/* For the structure.  */
+#  if !defined IS_IN_linuxthreads && !defined DO_MODIFY_LDT
+#   include "useldt.h"		/* For the structure.  */
+#  endif
 #  if __ASSUME_LDT_WORKS > 0
 #   define TLS_DO_MODIFY_LDT_KERNEL_CHECK(doit) (doit) /* Nothing to check.  */
 #  else