about summary refs log tree commit diff
path: root/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-12-14 19:49:13 +0000
committerUlrich Drepper <drepper@redhat.com>2002-12-14 19:49:13 +0000
commit9d263d72848fb561e104a21da3ffccf791078f2a (patch)
treea4004b7cacfaf715a38199cdbb0c4114677c5508 /nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c
parent36b3f3eb117f2923b1080a22f748e4a6cd63de73 (diff)
downloadglibc-9d263d72848fb561e104a21da3ffccf791078f2a.tar.gz
glibc-9d263d72848fb561e104a21da3ffccf791078f2a.tar.xz
glibc-9d263d72848fb561e104a21da3ffccf791078f2a.zip
Update.
2002-12-14  Jakub Jelinek  <jakub@redhat.com>

	* dirent/bug-readdir1.c: Include unistd.h.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c b/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c
index 80b6dbcb4f..bf0551a7e4 100644
--- a/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c
+++ b/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c
@@ -17,8 +17,10 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <unistd.h>
 #include <list.h>
 #include "fork.h"
+#include <tls.h>
 #include <bits/libc-lock.h>
 
 
@@ -38,4 +40,15 @@ __libc_pthread_init (ptr, reclaim)
 
   /* The fork handler needed by libpthread.  */
   list_add_tail (&pthread_child_handler.list, &__fork_child_list);
+
+  /* We have a macro which is used in asm code describing data layout.
+     Make sure it does not get out of date.  */
+  if (offsetof (struct pthread, header.data.multiple_threads)
+      != MULTIPLE_THREADS_OFFSET)
+    {
+#define str_n_len(str) str, sizeof (str) - 1
+      __libc_write (STDERR_FILENO,
+		    str_n_len ("*** MULTIPLE_THREADS_OFFSET out of date\n"));
+      _exit (1);
+    }
 }