From 6a45dea77e05e98baf5aaeba07b4085034f7857c Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 16 Aug 2002 05:45:24 +0000 Subject: (_res): Define as a macro if __UCLIBC_HAS_THREADS__ is defined, regardless of _LIBC. --- include/resolv.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'include/resolv.h') diff --git a/include/resolv.h b/include/resolv.h index d77a42ecd..6b935117e 100644 --- a/include/resolv.h +++ b/include/resolv.h @@ -216,17 +216,23 @@ typedef struct __res_state *res_state; #define RES_PRF_INIT 0x00004000 /* 0x00008000 */ + /* Things involving an internal (static) resolver context. */ -#if !defined _LIBC || defined __UCLIBC_HAS_THREADS__ +#if defined __UCLIBC_HAS_THREADS__ + __BEGIN_DECLS extern struct __res_state *__res_state(void) __attribute__ ((__const__)); __END_DECLS #define _res (*__res_state()) -#else + +#else /* !__UCLIBC_HAS_THREADS__ */ + #ifndef __BIND_NOSTATIC extern struct __res_state _res; #endif -#endif + +#endif /* __UCLIBC_HAS_THREADS__ */ + #ifndef __BIND_NOSTATIC #define fp_nquery __fp_nquery -- cgit v1.2.3