diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 19:06:20 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 19:06:58 +0000 |
commit | 3fcbb67b7949a8b362de5558bf1c6dd7ec5d21cf (patch) | |
tree | b867f9a6d3426f212b2f073bef8067a830f13022 /include/errno.h | |
parent | b6df7ac2cbe11e6a72f2ab7bd35c6130b72d21d9 (diff) | |
parent | cab56836b146bc129f1ad43f0393d95a9deca63a (diff) |
Merge commit 'refs/top-bases/t/tls-threadvar' into t/tls-threadvar
Diffstat (limited to 'include/errno.h')
-rw-r--r-- | include/errno.h | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/include/errno.h b/include/errno.h index 1d542ec1d4..457114b27a 100644 --- a/include/errno.h +++ b/include/errno.h @@ -1,8 +1,6 @@ #ifndef _ERRNO_H - #include <stdlib/errno.h> - -#if defined _ERRNO_H && !defined _ISOMAC && !defined __cplusplus +#if !defined _ISOMAC && !defined __ASSEMBLER__ # if IS_IN (rtld) # include <dl-sysdep.h> @@ -22,33 +20,28 @@ # define errno rtld_errno extern int rtld_errno attribute_hidden; -# elif IS_IN_LIB +# elif IS_IN_LIB && !IS_IN (rtld) # include <tls.h> -# if !(defined(__GNU__) && IS_IN (rtld)) -# undef errno -# if IS_IN (libc) -# define errno __libc_errno -# else -# define errno errno /* For #ifndef errno tests. */ -# endif -extern __thread int errno attribute_tls_model_ie; +# undef errno +# if IS_IN (libc) +# define errno __libc_errno +# else +# define errno errno /* For #ifndef errno tests. */ # endif +extern __thread int errno attribute_tls_model_ie; # endif /* IS_IN_LIB */ # define __set_errno(val) (errno = (val)) -# ifndef __ASSEMBLER__ -extern int *__errno_location (void) __THROW __attribute__ ((__const__)) +extern int *__errno_location (void) __THROW __attribute_const__ # if RTLD_PRIVATE_ERRNO attribute_hidden # endif ; libc_hidden_proto (__errno_location) -# endif - -#endif /* _ERRNO_H */ -#endif /* ! _ERRNO_H */ +#endif /* !_ISOMAC && !__ASSEMBLER__ */ +#endif /* !_ERRNO_H */ |