diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-01-21 21:23:21 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-01-21 21:23:21 +0000 |
commit | a5fdf99b7c4d23acbc3d3f77f6c4d4456ff6006f (patch) | |
tree | 50505d8e5c6d5e9a45cffa622461612d11fc369c /nss/getXXbyYY.c | |
parent | df18ec9afef6afd29c3b19bccec35e4dbe4563bf (diff) | |
download | glibc-a5fdf99b7c4d23acbc3d3f77f6c4d4456ff6006f.zip glibc-a5fdf99b7c4d23acbc3d3f77f6c4d4456ff6006f.tar.gz glibc-a5fdf99b7c4d23acbc3d3f77f6c4d4456ff6006f.tar.bz2 |
Update.
2000-12-09 H.J. Lu <hjl@gnu.org>
* nss/Makefile (routines): Add digits_dots.
* nss/Versions (libc): Add __nss_hostname_digits_dots to GLIBC_2.2.2.
* nss/digits_dots.c (__nss_hostname_digits_dots): Turn template
into a function.
* nss/nsswitch.h (__nss_hostname_digits_dots): New internal NSS
function.
* nss/getXXbyYY.c (H_ERRNO_VAR_P): New definition.
(TYPE_VAR_P): Likewise.
(FLAGS_VAR): Likewise.
(AF_VAR_P): Likewise.
(INTERNAL (REENTRANT_NAME)): Call __nss_hostname_digits_dots ()
instead of including digits_dots.c.
* nss/getXXbyYY_r.c (H_ERRNO_VAR_P): New definition.
(TYPE_VAR_P): Likewise.
(FLAGS_VAR): Likewise.
(AF_VAR_P): Likewise.
(INTERNAL (REENTRANT_NAME)): Call __nss_hostname_digits_dots ()
instead of including digits_dots.c.
Diffstat (limited to 'nss/getXXbyYY.c')
-rw-r--r-- | nss/getXXbyYY.c | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/nss/getXXbyYY.c b/nss/getXXbyYY.c index ebddb98..7dfd71f 100644 --- a/nss/getXXbyYY.c +++ b/nss/getXXbyYY.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -59,11 +59,23 @@ #ifdef NEED_H_ERRNO # define H_ERRNO_PARM , int *h_errnop # define H_ERRNO_VAR , &h_errno_tmp +# define H_ERRNO_VAR_P &h_errno_tmp #else # define H_ERRNO_PARM # define H_ERRNO_VAR +# define H_ERRNO_VAR_P NULL #endif +#ifndef HAVE_TYPE +# define TYPE_VAR_P NULL +# define FLAGS_VAR 0 +#endif + +#ifdef HAVE_AF +# define AF_VAR_P &af +#else +# define AF_VAR_P NULL +#endif /* Prototype for reentrant version we use here. */ extern int INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, @@ -86,9 +98,6 @@ FUNCTION_NAME (ADD_PARAMS) int save; #ifdef NEED_H_ERRNO int h_errno_tmp = 0; -# ifdef HANDLE_DIGITS_DOTS - int *const h_errnop = &h_errno_tmp;; -# endif #endif /* Get lock. */ @@ -100,22 +109,17 @@ FUNCTION_NAME (ADD_PARAMS) buffer = malloc (buffer_size); } +#ifdef HANDLE_DIGITS_DOTS 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_ninit (&_res) == -1) - { -# ifdef NEED_H_ERRNO - h_errno_tmp = NETDB_INTERNAL; -# endif - result = NULL; - goto done; - } -# include "digits_dots.c" -#endif + if (__nss_hostname_digits_dots (name, &resbuf, &buffer, + &buffer_size, + 0, &result, NULL, TYPE_VAR_P, + FLAGS_VAR, AF_VAR_P, + H_ERRNO_VAR_P)) + goto done; } +#endif while (buffer != NULL && (INTERNAL (REENTRANT_NAME) (ADD_VARIABLES, &resbuf, buffer, |