summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@lsi.nec.co.jp>2002-08-16 05:37:11 +0000
committerMiles Bader <miles@lsi.nec.co.jp>2002-08-16 05:37:11 +0000
commit8af1b6d43805ff990f4334f8623683f4f602d30e (patch)
tree0274027f7b7ed24b5a829dfb2d91c2b96c7cb8a8
parent2d73ea9bd025d716d3ec1cad1bdb5fce49bdd29b (diff)
(h_errno): Only define as a macro if __UCLIBC_HAS_THREADS__ is defined.
(__set_h_errno): Just assign to `h_errno' (which will be expanded to the thread-friendly version when appropriate).
-rw-r--r--include/netdb.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/include/netdb.h b/include/netdb.h
index ffa9cd524..e4732c385 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -60,19 +60,10 @@ extern int h_errno;
extern int *__h_errno_location (void) __THROW __attribute__ ((__const__));
#ifdef _LIBC
-# ifdef __UCLIBC_HAS_THREADS__
-static inline int
-__set_h_errno (int __err)
-{
- return *__h_errno_location () = __err;
-}
-# else
-# define __set_h_errno(x) (h_errno = (x))
-# endif /* __UCLIBC_HAS_THREADS__ */
-#endif /* _LIBC */
-
+# define __set_h_errno(x) (h_errno = (x))
+#endif
-#if !defined _LIBC || defined __UCLIBC_HAS_THREADS__
+#if defined __UCLIBC_HAS_THREADS__
/* Use a macro to access always the thread specific `h_errno' variable. */
# define h_errno (*__h_errno_location ())
#endif