summaryrefslogtreecommitdiff
path: root/include/errno.h
diff options
context:
space:
mode:
authorAustin Foxley <austinf@cetoncorp.com>2009-09-19 09:54:20 -0700
committerAustin Foxley <austinf@cetoncorp.com>2009-09-26 09:26:28 -0700
commitd21497f9fba95688e464ae712bd6b4c0fbc4ea13 (patch)
treec6fb7dbd153266214843d5057672b49a22fc10d2 /include/errno.h
parent18cc8e0e459edf5391016ef76a4ff3108981d86a (diff)
include/: add tls errno and res_state
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'include/errno.h')
-rw-r--r--include/errno.h20
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 */