From 9b21e6bcf8986e076ca8aa4862bb76b76605e591 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 15 Oct 2002 22:50:43 +0000 Subject: 2002-10-16 Jakub Jelinek * include/libc-symbols.h (attribute_tls_model_ie): Define. * include/errno.h (errno): Define to __libc_errno in libc.so. Add attribute_tls_model_ie. * include/netdb.h (h_errno): Define to __libc_h_errno in libc.so. Add attribute_tls_model_ie. * include/resolv.h (_res): Define to __libc_res in libc.so. Add attribute_tls_model_ie. * inet/herrno.c (__libc_h_errno): Add hidden alias to h_errno. (h_errno): Define. * resolv/res_libc.c (__libc_res): Add hidden alias to _res. (_res): Define. * sysdeps/generic/bits/libc-tsd.h (__libc_tsd_define): Add attribute_tls_model_ie. * sysdeps/generic/errno-loc.c (errno): Only undefine if not using __thread. * sysdeps/generic/errno.c (__libc_errno): Add hidden alias to errno. * sysdeps/unix/sysv/linux/i386/sysdep.h (SYSCALL_ERROR_HANDLER): Use __libc_errno in USE___THREAD case. * sysdeps/unix/sysv/linux/x86_64/sysdep.h (SYSCALL_ERROR_HANDLER): Likewise. * configure.in (HAVE_TLS_MODEL_ATTRIBUTE): Check for __attribute__((tls_model (""))). * configure: Rebuilt. * config.h.in (HAVE_TLS_MODEL_ATTRIBUTE): Add. --- include/errno.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/errno.h') diff --git a/include/errno.h b/include/errno.h index eed947fd30..1663538661 100644 --- a/include/errno.h +++ b/include/errno.h @@ -24,8 +24,12 @@ extern int errno attribute_hidden; # if USE___THREAD # undef errno -# define errno errno /* For #ifndef errno tests. */ -extern __thread int errno; +# ifndef NOT_IN_libc +# define errno __libc_errno +# else +# define errno errno /* For #ifndef errno tests. */ +# endif +extern __thread int errno attribute_tls_model_ie; # define __set_errno(val) (errno = (val)) # else # define __set_errno(val) (*__errno_location ()) = (val) -- cgit v1.2.3