diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-07-18 16:05:57 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-07-18 16:05:57 +0000 |
commit | 30f22ab12d9b04b42bfcca4fe732a55a41a5f11f (patch) | |
tree | f8989180fbdeb0e5dda8834901f1f4589a4f6995 | |
parent | bbacd44b2a17982104a007218d46f76132abbed0 (diff) | |
download | glibc-30f22ab12d9b04b42bfcca4fe732a55a41a5f11f.zip glibc-30f22ab12d9b04b42bfcca4fe732a55a41a5f11f.tar.gz glibc-30f22ab12d9b04b42bfcca4fe732a55a41a5f11f.tar.bz2 |
Update.
1999-07-18 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* nscd/nscd_proto.h (__nscd_gethostbyaddr_r): Follow change from
1999-07-17 and adjust len parameter.
* nscd/nscd_gethst_r.c (__nscd_gethostbyaddr_r): Likewise.
* nscd/gethstbyad_r.c (ADD_PARAMS): Likewise.
* manual/socket.texi (Host Names): Likewise.
* nis/nss_nis/nis-hosts.c (_nss_nis_gethostbyaddr_r): Likewise.
* nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_gethostbyaddr_r):
Likewise.
* resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr_r): Likewise.
* resolv/gethnamaddr.c (gethostbyaddr): Likewise.
(ht_gethostbyaddr): Likewise.
(_gethtbyaddr): Likewise.
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | manual/socket.texi | 4 | ||||
-rw-r--r-- | nis/nss_nis/nis-hosts.c | 4 | ||||
-rw-r--r-- | nis/nss_nisplus/nisplus-hosts.c | 4 | ||||
-rw-r--r-- | nscd/gethstbyad_r.c | 4 | ||||
-rw-r--r-- | nscd/nscd_gethst_r.c | 2 | ||||
-rw-r--r-- | nscd/nscd_proto.h | 4 | ||||
-rw-r--r-- | resolv/gethnamaddr.c | 9 | ||||
-rw-r--r-- | resolv/nss_dns/dns-host.c | 5 |
9 files changed, 35 insertions, 16 deletions
@@ -1,3 +1,18 @@ +1999-07-18 Andreas Jaeger <aj@arthur.rhein-neckar.de> + + * nscd/nscd_proto.h (__nscd_gethostbyaddr_r): Follow change from + 1999-07-17 and adjust len parameter. + * nscd/nscd_gethst_r.c (__nscd_gethostbyaddr_r): Likewise. + * nscd/gethstbyad_r.c (ADD_PARAMS): Likewise. + * manual/socket.texi (Host Names): Likewise. + * nis/nss_nis/nis-hosts.c (_nss_nis_gethostbyaddr_r): Likewise. + * nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_gethostbyaddr_r): + Likewise. + * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr_r): Likewise. + * resolv/gethnamaddr.c (gethostbyaddr): Likewise. + (ht_gethostbyaddr): Likewise. + (_gethtbyaddr): Likewise. + 1999-07-17 Ulrich Drepper <drepper@cygnus.com> * resolv/netdb.h: Adjust parameters of gethostbyaddr and diff --git a/manual/socket.texi b/manual/socket.texi index b89a63f..448962f 100644 --- a/manual/socket.texi +++ b/manual/socket.texi @@ -1219,7 +1219,7 @@ allows the caller to specify the desired address family (e.g.@: @comment netdb.h @comment BSD -@deftypefun {struct hostent *} gethostbyaddr (const char *@var{addr}, int @var{length}, int @var{format}) +@deftypefun {struct hostent *} gethostbyaddr (const char *@var{addr}, size_t @var{length}, int @var{format}) The @code{gethostbyaddr} function returns information about the host with Internet address @var{addr}. The parameter @var{addr} is not really a pointer to char - it can be a pointer to an IPv4 or an IPv6 @@ -1332,7 +1332,7 @@ allows the caller to specify the desired address family (e.g.@: @comment netdb.h @comment GNU -@deftypefun int gethostbyaddr_r (const char *@var{addr}, int @var{length}, int @var{format}, struct hostent *restrict @var{result_buf}, char *restrict @var{buf}, size_t @var{buflen}, struct hostent **restrict @var{result}, int *restrict @var{h_errnop}) +@deftypefun int gethostbyaddr_r (const char *@var{addr}, size_t @var{length}, int @var{format}, struct hostent *restrict @var{result_buf}, char *restrict @var{buf}, size_t @var{buflen}, struct hostent **restrict @var{result}, int *restrict @var{h_errnop}) The @code{gethostbyaddr_r} function returns information about the host with Internet address @var{addr}. The parameter @var{addr} is not really a pointer to char - it can be a pointer to an IPv4 or an IPv6 diff --git a/nis/nss_nis/nis-hosts.c b/nis/nss_nis/nis-hosts.c index d791b98..ddf777a 100644 --- a/nis/nss_nis/nis-hosts.c +++ b/nis/nss_nis/nis-hosts.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996. @@ -341,7 +341,7 @@ _nss_nis_gethostbyname_r (const char *name, struct hostent *host, char *buffer, } enum nss_status -_nss_nis_gethostbyaddr_r (char *addr, int addrlen, int type, +_nss_nis_gethostbyaddr_r (char *addr, size_t addrlen, int type, struct hostent *host, char *buffer, size_t buflen, int *errnop, int *h_errnop) { diff --git a/nis/nss_nisplus/nisplus-hosts.c b/nis/nss_nisplus/nisplus-hosts.c index 375315b..964729c 100644 --- a/nis/nss_nisplus/nisplus-hosts.c +++ b/nis/nss_nisplus/nisplus-hosts.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997. @@ -418,7 +418,7 @@ _nss_nisplus_gethostbyname_r (const char *name, struct hostent *host, } enum nss_status -_nss_nisplus_gethostbyaddr_r (const char *addr, int addrlen, int type, +_nss_nisplus_gethostbyaddr_r (const char *addr, size_t addrlen, int type, struct hostent *host, char *buffer, size_t buflen, int *errnop, int *herrnop) { diff --git a/nscd/gethstbyad_r.c b/nscd/gethstbyad_r.c index c22044a..d68d4f2 100644 --- a/nscd/gethstbyad_r.c +++ b/nscd/gethstbyad_r.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -23,7 +23,7 @@ #define LOOKUP_TYPE struct hostent #define FUNCTION_NAME gethostbyaddr #define DATABASE_NAME hosts -#define ADD_PARAMS const char *addr, int len, int type +#define ADD_PARAMS const char *addr, size_t len, int type #define ADD_VARIABLES addr, len, type #define NEED_H_ERRNO 1 #define NEED__RES 1 diff --git a/nscd/nscd_gethst_r.c b/nscd/nscd_gethst_r.c index 5dbe05d..c4ab364 100644 --- a/nscd/nscd_gethst_r.c +++ b/nscd/nscd_gethst_r.c @@ -67,7 +67,7 @@ __nscd_gethostbyname2_r (const char *name, int af, struct hostent *resultbuf, int -__nscd_gethostbyaddr_r (const char *addr, int len, int type, +__nscd_gethostbyaddr_r (const char *addr, size_t len, int type, struct hostent *resultbuf, char *buffer, size_t buflen, int *h_errnop) { diff --git a/nscd/nscd_proto.h b/nscd/nscd_proto.h index 760b57d..d9b92bf 100644 --- a/nscd/nscd_proto.h +++ b/nscd/nscd_proto.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@uni-paderborn.de>, 1998. @@ -45,7 +45,7 @@ extern int __nscd_gethostbyname2_r __P ((const char *name, int af, struct hostent *resultbuf, char *buffer, size_t buflen, int *h_errnop)); -extern int __nscd_gethostbyaddr_r __P ((const char *addr, int len, int type, +extern int __nscd_gethostbyaddr_r __P ((const char *addr, size_t len, int type, struct hostent *resultbuf, char *buffer, size_t buflen, int *h_errnop)); diff --git a/resolv/gethnamaddr.c b/resolv/gethnamaddr.c index 4a85460..4484b81 100644 --- a/resolv/gethnamaddr.c +++ b/resolv/gethnamaddr.c @@ -621,7 +621,8 @@ gethostbyname2(name, af) struct hostent * gethostbyaddr(addr, len, af) const char *addr; /* XXX should have been def'd as u_char! */ - int len, af; + size_t len; + int af; { const u_char *uaddr = (const u_char *)addr; static const u_char mapped[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0xff,0xff }; @@ -869,7 +870,8 @@ _gethtbyname2(name, af) struct hostent * _gethtbyaddr(addr, len, af) const char *addr; - int len, af; + size_t len; + int af; { register struct hostent *p; @@ -1000,7 +1002,8 @@ ht_gethostbyname(name) struct hostent * ht_gethostbyaddr(addr, len, af) const char *addr; - int len, af; + size_t len; + int af; { return (_gethtbyaddr(addr, len, af)); } diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c index 16146ed..1df7c23 100644 --- a/resolv/nss_dns/dns-host.c +++ b/resolv/nss_dns/dns-host.c @@ -191,7 +191,7 @@ _nss_dns_gethostbyname_r (const char *name, struct hostent *result, enum nss_status -_nss_dns_gethostbyaddr_r (const char *addr, int len, int af, +_nss_dns_gethostbyaddr_r (const char *addr, size_t len, int af, struct hostent *result, char *buffer, size_t buflen, int *errnop, int *h_errnop) { @@ -207,7 +207,8 @@ _nss_dns_gethostbyaddr_r (const char *addr, int len, int af, } *host_data = (struct host_data *) buffer; querybuf host_buffer; char qbuf[MAXDNAME+1], *qp; - int size, n, status; + size_t size; + int n, status; if (af == AF_INET6 && len == IN6ADDRSZ && (memcmp (uaddr, mapped, sizeof mapped) == 0 |