about summary refs log tree commit diff
path: root/linuxthreads/pthread.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-10-11 10:55:33 +0000
committerRoland McGrath <roland@gnu.org>2002-10-11 10:55:33 +0000
commit3021e36d989d96ddb46e4f98da3dc91eddcf725d (patch)
tree3059a5ff33b0ba3f6b496d9e756ebedca4c79aba /linuxthreads/pthread.c
parentce460d04a5bd10d7353ca37dfa9d34275449fb3b (diff)
downloadglibc-3021e36d989d96ddb46e4f98da3dc91eddcf725d.tar.gz
glibc-3021e36d989d96ddb46e4f98da3dc91eddcf725d.tar.xz
glibc-3021e36d989d96ddb46e4f98da3dc91eddcf725d.zip
* stdio-common/tst-sscanf.c (val_double): Append .0 to large whole
	number literals, so they are doubles instead of ints.
Diffstat (limited to 'linuxthreads/pthread.c')
-rw-r--r--linuxthreads/pthread.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/linuxthreads/pthread.c b/linuxthreads/pthread.c
index e2042bdb74..f119619602 100644
--- a/linuxthreads/pthread.c
+++ b/linuxthreads/pthread.c
@@ -418,6 +418,19 @@ __pthread_init_max_stacksize(void)
     }
 }
 
+#ifdef SHARED
+# if USE___THREAD
+/* When using __thread for this, we do it in libc so as not
+   to give libpthread its own TLS segment just for this.  */
+extern void **__libc_dl_error_tsd (void) __attribute__ ((const));
+# else
+static void ** __attribute__ ((const))
+__libc_dl_error_tsd (void)
+{
+  return &thread_self ()->p_libc_specific[_LIBC_TSD_KEY_DL_ERROR];
+}
+# endif
+#endif
 
 static void pthread_initialize(void)
 {
@@ -498,6 +511,10 @@ static void pthread_initialize(void)
     __on_exit (pthread_onexit_process, NULL);
   /* How many processors.  */
   __pthread_smp_kernel = is_smp_system ();
+
+#ifdef SHARED
+  GL(dl_error_catch_tsd) = &__libc_dl_error_tsd;
+#endif
 }
 
 void __pthread_initialize(void)