This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[COMMITTED PATCH] Clean up h_errno declaration to use __thread unconditionally.


There is bit rot in the [!_LIBC_REENTRANT] case for h_errno.  Since we
already use __thread unconditionally for errno, I've just made its use for
h_errno be unconditional too.


Thanks,
Roland


	* include/netdb.h [!_ISOMAC]:
	Don't include <tls.h>.
	(h_errno, __libc_h_errno): Move declaration and macros out of
	[_LIBC_REENTRANT].

--- a/include/netdb.h
+++ b/include/netdb.h
@@ -6,17 +6,12 @@
 /* Macros for accessing h_errno from inside libc.  */
 # 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;
+#  ifndef NOT_IN_libc
+#   define h_errno __libc_h_errno
 #  else
-extern int h_errno;
-#  endif	/* _LIBC_REENTRANT */
+#   define h_errno h_errno	/* For #ifndef h_errno tests.  */
+#  endif
+extern __thread int h_errno attribute_tls_model_ie;
 # endif /* !NOT_IN_libc || IN_LIB */
 # define __set_h_errno(x) (h_errno = (x))
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]