aboutsummaryrefslogtreecommitdiff
path: root/nss
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-12-21 12:25:07 +0000
committerUlrich Drepper <drepper@redhat.com>1998-12-21 12:25:07 +0000
commitd17a729b483109285ac4913c3fe4f2c620b87fc6 (patch)
tree17c9ddc622b007d816c3b1a9d4e2499dde926da3 /nss
parent095827866f985081ad64a5eea34c0fe5df854e32 (diff)
downloadglibc-d17a729b483109285ac4913c3fe4f2c620b87fc6.zip
glibc-d17a729b483109285ac4913c3fe4f2c620b87fc6.tar.gz
glibc-d17a729b483109285ac4913c3fe4f2c620b87fc6.tar.bz2
Update.
1998-12-21 Ulrich Drepper <drepper@cygnus.com> * inet/gethstbynm_r.c: Remove NEED__RES definition since we do this anyway for digits_dots.c. * nss/getXXbyYY.c: Initialize _res before using digits_dots.c functions. * nss/getXXbyYY_r.c: Likewise. 1998-12-19 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * sunrpc/key_call.c (getkeyserv_handle): Use __fcntl instead of fcntl. 1998-12-20 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * locale/weight.h (get_weight): Extract string elements as unsigned values.
Diffstat (limited to 'nss')
-rw-r--r--nss/getXXbyYY.c10
-rw-r--r--nss/getXXbyYY_r.c8
2 files changed, 18 insertions, 0 deletions
diff --git a/nss/getXXbyYY.c b/nss/getXXbyYY.c
index 21baad9..a79fd08 100644
--- a/nss/getXXbyYY.c
+++ b/nss/getXXbyYY.c
@@ -96,6 +96,16 @@ FUNCTION_NAME (ADD_PARAMS)
if (buffer != NULL)
{
#ifdef HANDLE_DIGITS_DOTS
+ /* We have to test for the use of IPv6 which can only be done by
+ examining `_res'. */
+ if ((_res.options & RES_INIT) == 0 && res_init () == -1)
+ {
+# ifdef NEED_H_ERRNO
+ h_errno_tmp = NETDB_INTERNAL;
+# endif
+ result = NULL;
+ goto done;
+ }
# include "digits_dots.c"
#endif
}
diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c
index 7e567a1..3c7f2a1 100644
--- a/nss/getXXbyYY_r.c
+++ b/nss/getXXbyYY_r.c
@@ -115,6 +115,14 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
#endif
#ifdef HANDLE_DIGITS_DOTS
+ /* We have to test for the use of IPv6 which can only be done by
+ examining `_res'. */
+ if ((_res.options & RES_INIT) == 0 && res_init () == -1)
+ {
+ *h_errnop = NETDB_INTERNAL;
+ *result = NULL;
+ return -1;
+ }
# define resbuf (*resbuf)
# include "digits_dots.c"
# undef resbuf