This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: getaddrinfo(), getnameinfo() and friends question
- To: drepper at cygnus dot com (Ulrich Drepper)
- Subject: Re: getaddrinfo(), getnameinfo() and friends question
- From: Andreas Jaeger <aj at suse dot de>
- Date: 01 Aug 2000 09:42:39 +0200
- Cc: Stig Venaas <venaas at nvg dot ntnu dot no>,Arkadiusz Miskiewicz <misiek at pld dot org dot pl>,libc-alpha at sourceware dot cygnus dot com
- References: <20000730114148.A15880@ikar.t17.ds.pwr.wroc.pl><misiek@pld.org.pl> <E13IsKb-0001aO-00@kings-cross.london.uk.eu.org><20000730195821.A17018@nvg.ntnu.no><m3bszfiibi.fsf@otr.mynet.cygnus.com><u8d7jui7qs.fsf@gromit.rhein-neckar.de><m366plevzm.fsf@otr.mynet.cygnus.com>
>>>>> Ulrich Drepper writes:
Uli> Andreas Jaeger <aj@suse.de> writes:
>> Here's a first patch to remove getipnodebyname etc. Ok, to commit?
Uli> I've done it. Thanks.
>> Shall I send a patch to remove the functions completly?
Uli> Let's leve the code in there. Who knows...
Ok, but then we shouldn't build them. Here's a patch to not build
them and a further patch for Versions.
We still have getipnodebyaddr in the different NSS files. Shall we
#ifdef 0 those?
Here's a patch for all of this. This time the patch is actually
tested (I run make;make check), sorry about the problems with the last
one.
Shall I commit this?
Andreas
2000-08-01 Andreas Jaeger <aj@suse.de>
* conform/data/netdb.h-data: Remove getipnodebyaddr and friends.
* include/netdb.h: Remove getipnodebyaddr and friends, leave
constants in.
* nis/Versions : Remove _nss_nis_getipnodebyname_r and
_nss_nisplus_getipnodebyname_r.
* nis/nss_nis/nis-hosts.c (_nss_nis_getipnodebyname_r): #if 0 for
now, getipnodebyname is deprecated.
* nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_getipnodebyname_r): Likewise.
* inet/Makefile (routines): Don't build getipnodebyaddr and
friends.
============================================================
Index: nis/Versions
--- nis/Versions 2000/07/24 01:24:55 1.5
+++ nis/Versions 2000/08/01 07:15:24
@@ -95,7 +95,7 @@
_nss_nis_setrpcent; _nss_nis_setservent; _nss_nis_setspent;
}
GLIBC_2.2 {
- _nss_nis_getipnodebyname_r; _nss_nis_initgroups_dyn;
+ _nss_nis_initgroups_dyn;
}
}
@@ -127,8 +127,5 @@
_nss_nisplus_setnetent; _nss_nisplus_setnetgrent; _nss_nisplus_setprotoent;
_nss_nisplus_setpwent; _nss_nisplus_setrpcent; _nss_nisplus_setservent;
_nss_nisplus_setspent;
- }
- GLIBC_2.2 {
- _nss_nisplus_getipnodebyname_r;
}
}
============================================================
Index: nis/nss_nis/nis-hosts.c
--- nis/nss_nis/nis-hosts.c 2000/04/30 04:11:18 1.19
+++ nis/nss_nis/nis-hosts.c 2000/08/01 07:15:24
@@ -434,6 +434,7 @@
return NSS_STATUS_SUCCESS;
}
+#if 0
enum nss_status
_nss_nis_getipnodebyname_r (const char *name, int af, int flags,
struct hostent *result, char *buffer,
@@ -442,3 +443,4 @@
return internal_gethostbyname2_r (name, af, result, buffer, buflen,
errnop, herrnop, flags);
}
+#endif
============================================================
Index: nis/nss_nisplus/nisplus-hosts.c
--- nis/nss_nisplus/nisplus-hosts.c 2000/04/30 04:11:57 1.21
+++ nis/nss_nisplus/nisplus-hosts.c 2000/08/01 07:15:25
@@ -416,6 +416,7 @@
((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0));
}
+#if 0
enum nss_status
_nss_nisplus_getipnodebyname_r (const char *name, int af, int flags,
struct hostent *result, char *buffer,
@@ -424,6 +425,7 @@
return internal_gethostbyname2_r (name, af, result, buffer, buflen,
errnop, herrnop, flags);
}
+#endif
enum nss_status
_nss_nisplus_gethostbyname_r (const char *name, struct hostent *host,
============================================================
Index: inet/Makefile
--- inet/Makefile 2000/08/01 04:57:30 1.42
+++ inet/Makefile 2000/08/01 07:15:25
@@ -45,8 +45,7 @@
rcmd rexec ruserpass \
getnetgrent_r getnetgrent \
getaliasent_r getaliasent getaliasname getaliasname_r \
- in6_addr getnameinfo if_index getipnodebyad freehostent \
- getipnodebynm
+ in6_addr getnameinfo if_index
tests := htontest test_ifindex tst-ntoa tst-ether_aton tst-network # tst-ipnode
============================================================
Index: conform/data/netdb.h-data
--- conform/data/netdb.h-data 2000/04/30 03:48:29 1.1
+++ conform/data/netdb.h-data 2000/08/01 07:15:25
@@ -51,10 +51,8 @@
function void endnetent (void)
function void endprotoent (void)
function void endservent (void)
-function void freehostent (struct hostent*)
function {struct hostent*} gethostbyaddr (const void*, socklen_t, int)
function {struct hostent*} gethostbyname (const char*)
function {struct hostent*} gethostent (void)
-function {struct hostent*} getipnodebyaddr (const void*, socklen_t, int, int*)
#endif
============================================================
Index: include/netdb.h
--- include/netdb.h 2000/08/01 04:03:00 1.9
+++ include/netdb.h 2000/08/01 07:15:25
@@ -85,24 +85,10 @@
/* The following declarations and definitions have been removed from
the public header since we don't want people to use them. */
-/* Return entry from host data base which address match ADDR with
- length LEN and type TYPE in newly allocated buffer. */
-extern struct hostent *getipnodebyaddr (__const void *__addr, socklen_t __len,
- int __type, int *__error_num) __THROW;
-
-/* Return entry from host data base for host with NAME and newly allocated
- buffer. FLAGS is some combination of the following AI_* values. */
-extern struct hostent *getipnodebyname (__const char *__name, int __type,
- int __flags, int *__error_num) __THROW;
-
#define AI_V4MAPPED 0x0008 /* IPv4-mapped addresses are acceptable. */
#define AI_ALL 0x0010 /* Return both IPv4 and IPv6 addresses. */
#define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose
returned address type. */
#define AI_DEFAULT (AI_V4MAPPED | AI_ADDRCONFIG)
-
-/* Free structure returned by previous `getipnodebyaddr' or `getipnodebyname'
- call. */
-extern void freehostent (struct hostent *__ptr) __THROW;
#endif /* !_NETDB_H */
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj