OSDN Git Service

Revert "don't make __errno_location / __h_errno_location hidden"
authorAustin Foxley <austinf@cetoncorp.com>
Tue, 6 Jul 2010 15:30:00 +0000 (08:30 -0700)
committerAustin Foxley <austinf@cetoncorp.com>
Tue, 6 Jul 2010 15:30:00 +0000 (08:30 -0700)
This reverts commit 0d6ee549bc86fd330672a79d9a87d2c3825eea67.

We need to find a solution that will work in shared and static libraries

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
include/netdb.h
libc/misc/internals/__errno_location.c
libc/misc/internals/__h_errno_location.c
libc/sysdeps/linux/common/bits/errno.h
libc/sysdeps/linux/common/bits/uClibc_errno.h

index ac411ab..9d3807d 100644 (file)
@@ -59,6 +59,7 @@ __BEGIN_DECLS
 
 /* Function to get address of global `h_errno' variable.  */
 extern int *__h_errno_location (void) __THROW __attribute__ ((__const__));
+libc_hidden_proto(__h_errno_location)
 
 /* Macros for accessing h_errno from inside libc.  */
 #ifdef _LIBC
index 71c5461..aec7641 100644 (file)
@@ -15,3 +15,6 @@ __errno_location (void)
 {
     return &errno;
 }
+#ifdef IS_IN_libc /* not really need, only to keep in sync w/ libc_hidden_proto */
+libc_hidden_weak(__errno_location)
+#endif
index 235df4e..213d398 100644 (file)
@@ -10,3 +10,4 @@ int * weak_const_function __h_errno_location (void)
 {
     return &h_errno;
 }
+libc_hidden_weak(__h_errno_location)
index de9688a..0bf6354 100644 (file)
@@ -43,6 +43,7 @@
 # ifndef __ASSEMBLER__
 /* Function to get address of global `errno' variable.  */
 extern int *__errno_location (void) __THROW __attribute__ ((__const__));
+libc_hidden_proto(__errno_location)
 
 #  ifdef __UCLIBC_HAS_THREADS__
 /* When using threads, errno is a per-thread value.  */
index 79eb7e6..9c15618 100644 (file)
@@ -33,6 +33,9 @@ extern int *__errno_location (void) __THROW __attribute__ ((__const__))
 ;
 # if defined __UCLIBC_HAS_THREADS__
 #  include <tls.h>
+#  if defined USE___THREAD && USE___THREAD
+libc_hidden_proto(__errno_location)
+#  endif
 # endif
 
 #endif /* !__ASSEMBLER__ */