* sysdeps/i386/i586/memcpy_chk.S: New file.
[glibc.git] / include / errno.h
blob80c7b6ec132ce0470d054d4036670c7fb5ad394e
1 #ifndef _ERRNO_H
3 #include <stdlib/errno.h>
5 #if defined _ERRNO_H && !defined _ISOMAC && !defined __cplusplus
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 rtld_errno
18 extern int rtld_errno attribute_hidden;
20 # else
22 # include <tls.h>
24 # if USE___THREAD
25 # undef errno
26 # ifndef NOT_IN_libc
27 # define errno __libc_errno
28 # else
29 # define errno errno /* For #ifndef errno tests. */
30 # endif
31 extern __thread int errno attribute_tls_model_ie;
32 # endif
34 # endif /* RTLD_PRIVATE_ERRNO */
36 # define __set_errno(val) (errno = (val))
38 # ifndef __ASSEMBLER__
39 extern int *__errno_location (void) __THROW __attribute__ ((__const__))
40 # if RTLD_PRIVATE_ERRNO
41 attribute_hidden
42 # endif
44 libc_hidden_proto (__errno_location)
45 # endif
47 #endif /* _ERRNO_H */
49 #endif /* ! _ERRNO_H */