diff options
Diffstat (limited to 'include/errno.h')
-rw-r--r-- | include/errno.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/include/errno.h b/include/errno.h index 203a62e3e..bd363a258 100644 --- a/include/errno.h +++ b/include/errno.h @@ -43,10 +43,8 @@ __BEGIN_DECLS variable. This redeclaration using the macro still works, but it will be a function declaration without a prototype and may trigger a -Wstrict-prototypes warning. */ -#ifndef __ASSEMBLER__ -# ifndef errno +#ifndef errno extern int errno; -# endif #endif #if 0 /*def __USE_GNU uClibc note: not supported */ @@ -60,6 +58,24 @@ extern char *program_invocation_name, *program_invocation_short_name; __END_DECLS +#if defined _LIBC && defined __UCLIBC_HAS_THREADS_NATIVE__ +# 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 + +#define __set_errno(val) (errno = (val)) + +#ifndef __ASSEMBLER__ +extern int *__errno_location (void) __THROW __attribute__ ((__const__)); +#endif + #endif /* _ERRNO_H */ /* The Hurd <bits/errno.h> defines `error_t' as an enumerated type so |