From 8af1b6d43805ff990f4334f8623683f4f602d30e Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 16 Aug 2002 05:37:11 +0000 Subject: (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). --- include/netdb.h | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'include') 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 -- cgit v1.2.3