mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-24 02:03:35 +08:00
Update.
1999-07-18 Ulrich Drepper <drepper@cygnus.com> * inet/gethstbyad_r.c (PREPROCESS): Test for unspecified IPv6 address and return an error in this case. * nss/getXXbyYY_r.c: Allow PREPROCESS be defined and use it if available.
This commit is contained in:
parent
30f22ab12d
commit
ae81730fad
@ -1,3 +1,10 @@
|
||||
1999-07-18 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* inet/gethstbyad_r.c (PREPROCESS): Test for unspecified IPv6 address
|
||||
and return an error in this case.
|
||||
* nss/getXXbyYY_r.c: Allow PREPROCESS be defined and use it if
|
||||
available.
|
||||
|
||||
1999-07-18 Andreas Jaeger <aj@arthur.rhein-neckar.de>
|
||||
|
||||
* nscd/nscd_proto.h (__nscd_gethostbyaddr_r): Follow change from
|
||||
|
@ -18,6 +18,7 @@
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <netdb.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
#define LOOKUP_TYPE struct hostent
|
||||
@ -28,6 +29,17 @@
|
||||
#define NEED_H_ERRNO 1
|
||||
#define NEED__RES 1
|
||||
#define NEED__RES_HCONF 1
|
||||
/* If the addr parameter is the IPv6 unspecified address no query must
|
||||
be performed. */
|
||||
#define PREPROCESS \
|
||||
if (__builtin_expect (len == sizeof (struct in6_addr) \
|
||||
&& memcmp (&in6addr_any, addr, \
|
||||
sizeof (struct in6_addr)) == 0, 0)) \
|
||||
{ \
|
||||
*h_errnop = HOST_NOT_FOUND; \
|
||||
*result = NULL; \
|
||||
return ENOENT; \
|
||||
}
|
||||
#define POSTPROCESS \
|
||||
if (status == NSS_STATUS_SUCCESS) \
|
||||
{ \
|
||||
|
@ -49,6 +49,10 @@
|
||||
|* NEED__RES - the global _res variable might be used so we *|
|
||||
|* will have to initialize it if necessary *|
|
||||
|* *|
|
||||
|* PREPROCESS - code run before anything else *|
|
||||
|* *|
|
||||
|* POSTPROCESS - code run after the lookup *|
|
||||
|* *|
|
||||
\*******************************************************************/
|
||||
|
||||
/* To make the real sources a bit prettier. */
|
||||
@ -115,6 +119,10 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
|
||||
int nscd_status;
|
||||
#endif
|
||||
|
||||
#ifdef PREPROCESS
|
||||
PREPROCESS;
|
||||
#endif
|
||||
|
||||
#ifdef HANDLE_DIGITS_DOTS
|
||||
/* We have to test for the use of IPv6 which can only be done by
|
||||
examining `_res'. */
|
||||
|
Loading…
Reference in New Issue
Block a user