aboutsummaryrefslogtreecommitdiff
path: root/include/netdb.h
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2013-01-28 17:51:03 +0100
committerAndreas Schwab <schwab@suse.de>2013-02-04 10:01:54 +0100
commit903ae060db90aa1d72aa67afbc5a5ecabdcdbef7 (patch)
tree765f691bf506bef1017d12024366e48ca17cb831 /include/netdb.h
parent542f94662e8235d9917b0783df70bcdf9d729503 (diff)
downloadglibc-903ae060db90aa1d72aa67afbc5a5ecabdcdbef7.zip
glibc-903ae060db90aa1d72aa67afbc5a5ecabdcdbef7.tar.gz
glibc-903ae060db90aa1d72aa67afbc5a5ecabdcdbef7.tar.bz2
Don't use GLIBC_PRIVATE errno outside of libraries
Diffstat (limited to 'include/netdb.h')
-rw-r--r--include/netdb.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/include/netdb.h b/include/netdb.h
index 3f2ae06..8a569ba 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -3,18 +3,20 @@
#ifndef _ISOMAC
/* Macros for accessing h_errno from inside libc. */
-# undef h_errno
-# ifdef _LIBC_REENTRANT
-# include <tls.h>
-# ifndef NOT_IN_libc
-# define h_errno __libc_h_errno
-# else
-# define h_errno h_errno /* For #ifndef h_errno tests. */
-# endif
+# if !defined NOT_IN_libc || defined IN_LIB
+# undef h_errno
+# ifdef _LIBC_REENTRANT
+# include <tls.h>
+# ifndef NOT_IN_libc
+# define h_errno __libc_h_errno
+# else
+# define h_errno h_errno /* For #ifndef h_errno tests. */
+# endif
extern __thread int h_errno attribute_tls_model_ie;
-# else
+# else
extern int h_errno;
-# endif /* _LIBC_REENTRANT */
+# endif /* _LIBC_REENTRANT */
+# endif /* !NOT_IN_libc || IN_LIB */
# define __set_h_errno(x) (h_errno = (x))
libc_hidden_proto (hstrerror)