Files
glibc/include/errno.h
T

48 lines
1.1 KiB
C
Raw Normal View History

#ifndef _ERRNO_H
2002-07-20 01:14:41 +00:00
#include <stdlib/errno.h>
#if !defined _ISOMAC && !defined __ASSEMBLER__
1995-02-18 01:27:10 +00:00
2014-11-20 21:09:43 +05:30
# if IS_IN (rtld)
# include <dl-sysdep.h>
2014-03-14 10:44:34 -07:00
# ifndef RTLD_PRIVATE_ERRNO
# error "dl-sysdep.h must define RTLD_PRIVATE_ERRNO!"
# endif
# else
# define RTLD_PRIVATE_ERRNO 0
# 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. */
1995-02-18 01:27:10 +00:00
# undef errno
# define errno rtld_errno
extern int rtld_errno attribute_hidden;
2018-03-25 00:48:01 +01:00
# elif IS_IN_LIB && !IS_IN (rtld)
# include <tls.h>
2011-09-10 16:50:28 -04:00
# undef errno
2014-11-24 15:03:45 +05:30
# if IS_IN (libc)
2011-09-10 16:50:28 -04:00
# define errno __libc_errno
# else
# define errno errno /* For #ifndef errno tests. */
# endif
2011-09-10 16:50:28 -04:00
extern __thread int errno attribute_tls_model_ie;
2014-11-24 15:03:45 +05:30
# endif /* IS_IN_LIB */
# define __set_errno(val) (errno = (val))
extern int *__errno_location (void) __THROW __attribute_const__
2004-10-14 16:18:09 +00:00
# if RTLD_PRIVATE_ERRNO
attribute_hidden
# endif
;
2002-12-31 20:46:11 +00:00
libc_hidden_proto (__errno_location)
#endif /* !_ISOMAC && !__ASSEMBLER__ */
#endif /* !_ERRNO_H */