OSDN Git Service

nptl/errno: Use a separate __errno_location for libpthread.
authorKhem Raj <raj.khem@gmail.com>
Wed, 30 Jun 2010 11:09:20 +0000 (04:09 -0700)
committerKhem Raj <raj.khem@gmail.com>
Wed, 30 Jun 2010 11:09:20 +0000 (04:09 -0700)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
libc/misc/internals/__errno_location.c
libpthread/nptl/Makefile.in
libpthread/nptl/errno_location.c [new file with mode: 0644]

index 487a9c2..aec7641 100644 (file)
@@ -7,7 +7,11 @@
 #include "internal_errno.h"
 
 /* psm: moved to bits/errno.h: */
-int * weak_const_function __errno_location (void)
+int *
+#ifndef __UCLIBC_HAS_THREADS__
+weak_const_function
+#endif
+__errno_location (void)
 {
     return &errno;
 }
index 3accff7..da05689 100644 (file)
@@ -95,6 +95,7 @@ libpthread-routines-y = init vars events version \
                      pt-raise pt-system \
                      flockfile ftrylockfile funlockfile \
                      sigaction \
+                     errno_location \
                      herrno \
                      pthread_kill_other_threads \
                      pthread_getaffinity pthread_setaffinity \
diff --git a/libpthread/nptl/errno_location.c b/libpthread/nptl/errno_location.c
new file mode 100644 (file)
index 0000000..7458938
--- /dev/null
@@ -0,0 +1 @@
+#include <libc/misc/internals/__errno_location.c>