mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-23 03:10:05 +00:00
e470bcadf1
* include/errno.h: Use errno definition with __thread for now only in libc and ld.so.
21 lines
471 B
C
21 lines
471 B
C
#ifndef _ERRNO_H
|
|
|
|
#include <stdlib/errno.h>
|
|
|
|
#if defined _ERRNO_H && !defined _ISOMAC
|
|
|
|
# include <tls.h> /* Defines USE_TLS. */
|
|
|
|
# if USE_TLS && HAVE___THREAD && (!defined NOT_IN_libc || defined IS_IN_rtld)
|
|
# undef errno
|
|
# define errno errno /* For #ifndef errno tests. */
|
|
extern __thread int errno;
|
|
# define __set_errno(val) (errno = (val))
|
|
# else
|
|
# define __set_errno(val) (*__errno_location ()) = (val)
|
|
# endif
|
|
|
|
#endif /* _ERRNO_H */
|
|
|
|
#endif /* ! _ERRNO_H */
|