Include resolv/res_hconf.h if NEED__RES_HCONF is defined. Call
authordrepper <drepper>
Fri, 20 Nov 1998 17:24:55 +0000 (17:24 +0000)
committerdrepper <drepper>
Fri, 20 Nov 1998 17:24:55 +0000 (17:24 +0000)
res_hconf_init if necessary.  If POSTPROCESS is defined execute the
code.

nss/getXXbyYY_r.c

index 3befede..7e567a1 100644 (file)
@@ -22,6 +22,9 @@
 #ifdef USE_NSCD
 # include <nscd/nscd_proto.h>
 #endif
+#ifdef NEED__RES_HCONF
+# include <resolv/res_hconf.h>
+#endif
 
 /*******************************************************************\
 |* Here we assume several symbols to be defined:                  *|
@@ -153,6 +156,10 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
              return -1;
            }
 #endif /* need _res */
+#ifdef NEED__RES_HCONF
+         if (!_res_hconf.initialized)
+           _res_hconf_init ();
+#endif /* need _res_hconf */
        }
     }
   else
@@ -186,6 +193,9 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
 done:
 #endif
   *result = status == NSS_STATUS_SUCCESS ? resbuf : NULL;
+#ifdef POSTPROCESS
+  POSTPROCESS;
+#endif
   return status == NSS_STATUS_SUCCESS ? 0 : -1;
 }