diff options
Diffstat (limited to 'include/errno.h')
-rw-r--r-- | include/errno.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/include/errno.h b/include/errno.h index b2315b90a..85268f053 100644 --- a/include/errno.h +++ b/include/errno.h @@ -58,8 +58,24 @@ extern const char *program_invocation_name, *program_invocation_short_name; __END_DECLS -#if defined _LIBC && ( defined IS_IN_libc || defined NOT_IN_libc ) -#include <bits/uClibc_errno.h> +#if defined _LIBC && defined __UCLIBC_HAS_TLS__ +# if !defined NOT_IN_libc || defined IS_IN_libpthread +# 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 + +#ifndef __set_errno +#define __set_errno(val) (errno = (val)) +#endif + +#ifndef __ASSEMBLER__ +extern int *__errno_location (void) __THROW __attribute__ ((__const__)); #endif #endif /* _ERRNO_H */ |