mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-30 08:40:07 +00:00
983d597e9f
unconditionally.
41 lines
859 B
C
41 lines
859 B
C
#ifndef _ERRNO_H
|
|
|
|
#include <stdlib/errno.h>
|
|
|
|
#if defined _ERRNO_H && !defined _ISOMAC
|
|
|
|
# ifdef IS_IN_rtld
|
|
# include <dl-sysdep.h>
|
|
# endif
|
|
|
|
# if RTLD_PRIVATE_ERRNO
|
|
/* The dynamic linker uses its own private errno variable.
|
|
All access to errno inside the dynamic linker is serialized,
|
|
so a single (hidden) global variable is all it needs. */
|
|
|
|
# undef errno
|
|
# define errno errno /* For #ifndef errno tests. */
|
|
extern int errno attribute_hidden;
|
|
|
|
# else
|
|
|
|
# include <tls.h> /* Defines USE_TLS. */
|
|
|
|
# if USE___THREAD
|
|
# undef 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;
|
|
# endif
|
|
|
|
# endif /* RTLD_PRIVATE_ERRNO */
|
|
|
|
# define __set_errno(val) (errno = (val))
|
|
|
|
#endif /* _ERRNO_H */
|
|
|
|
#endif /* ! _ERRNO_H */
|