* sysdeps/unix/sysv/linux/m68k/sysdep.h: Support inline syscall
[glibc.git] / include / errno.h
blob166353866158d218131fdda90c9fe8f939c50e67
1 #ifndef _ERRNO_H
3 #include <stdlib/errno.h>
5 #if defined _ERRNO_H && !defined _ISOMAC
7 # ifdef IS_IN_rtld
8 # include <dl-sysdep.h>
9 # endif
11 # if RTLD_PRIVATE_ERRNO
12 /* The dynamic linker uses its own private errno variable.
13 All access to errno inside the dynamic linker is serialized,
14 so a single (hidden) global variable is all it needs. */
16 # undef errno
17 # define errno errno /* For #ifndef errno tests. */
18 extern int errno attribute_hidden;
19 # define __set_errno(val) (errno = (val))
21 # else
23 # include <tls.h> /* Defines USE_TLS. */
25 # if USE___THREAD
26 # undef errno
27 # ifndef NOT_IN_libc
28 # define errno __libc_errno
29 # else
30 # define errno errno /* For #ifndef errno tests. */
31 # endif
32 extern __thread int errno attribute_tls_model_ie;
33 # define __set_errno(val) (errno = (val))
34 # else
35 # define __set_errno(val) (*__errno_location ()) = (val)
36 # endif
38 # endif /* RTLD_PRIVATE_ERRNO */
40 #endif /* _ERRNO_H */
42 #endif /* ! _ERRNO_H */