res_ninit() -> res_ninit (&_res)
Mark Kettenis
kettenis@wins.uva.nl
Sat Jul 15 16:50:00 GMT 2000
Andreas, overlooked the use of res_init() in nss/getXXent_r.c. Here's
a patch.
Mark
PS The Hesiod NSS module still uses res_init() (and the other
thread-unsafe resolver interfaces). I'm almost finished testing
the module, and I'll send the appropriate patches in the near
future.
2000-07-15 Mark Kettenis <kettenis@gnu.org>
* nss/getXXent_r.c [NEED__RES]: Include <resolv.h>.
(SETFUNC_NAME, ENDFUNC_NAME, REENTRANT_GETNAME): Use res_ninit
instead of res_init.
Index: nss/getXXent_r.c
===================================================================
RCS file: /cvs/glibc/libc/nss/getXXent_r.c,v
retrieving revision 1.27
diff -u -p -r1.27 getXXent_r.c
--- nss/getXXent_r.c 2000/03/27 05:18:32 1.27
+++ nss/getXXent_r.c 2000/07/15 23:47:04
@@ -22,6 +22,10 @@
#include "nsswitch.h"
+#ifdef NEED__RES
+# include <resolv.h>
+#endif
+
/*******************************************************************\
|* Here we assume several symbols to be defined: *|
|* *|
@@ -149,7 +153,7 @@ SETFUNC_NAME (STAYOPEN)
int no_more;
#ifdef NEED__RES
- if ((_res.options & RES_INIT) == 0 && res_init () == -1)
+ if ((_res.options & RES_INIT) == 0 && __res_ninit (&_res) == -1)
{
__set_h_errno (NETDB_INTERNAL);
return;
@@ -187,7 +191,7 @@ ENDFUNC_NAME (void)
int no_more;
#ifdef NEED__RES
- if ((_res.options & RES_INIT) == 0 && res_init () == -1)
+ if ((_res.options & RES_INIT) == 0 && __res_ninit (&_res) == -1)
{
__set_h_errno (NETDB_INTERNAL);
return;
@@ -224,7 +228,7 @@ INTERNAL (REENTRANT_GETNAME) (LOOKUP_TYP
enum nss_status status;
#ifdef NEED__RES
- if ((_res.options & RES_INIT) == 0 && res_init () == -1)
+ if ((_res.options & RES_INIT) == 0 && __res_ninit (&_res) == -1)
{
__set_h_errno (NETDB_INTERNAL);
*result = NULL;
More information about the Libc-hacker
mailing list