summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@lsi.nec.co.jp>2002-08-16 05:45:24 +0000
committerMiles Bader <miles@lsi.nec.co.jp>2002-08-16 05:45:24 +0000
commit6a45dea77e05e98baf5aaeba07b4085034f7857c (patch)
tree80fe364926a74ac1feb940ef26828e0a7ced3b90
parent8af1b6d43805ff990f4334f8623683f4f602d30e (diff)
(_res): Define as a macro if __UCLIBC_HAS_THREADS__ is defined,
regardless of _LIBC.
-rw-r--r--include/resolv.h12
1 files changed, 9 insertions, 3 deletions
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