about summary refs log tree commit diff
path: root/resolv/inet_addr.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-04-02 03:09:41 +0000
committerUlrich Drepper <drepper@redhat.com>2000-04-02 03:09:41 +0000
commitad483238a1ef7bce6d8534a84ba548c455d1631e (patch)
treecb89ea9fdeba2be20d846869bcf726d9dca43f25 /resolv/inet_addr.c
parent9b48fa9b416094acd0f25a605c768f6cf3798f71 (diff)
downloadglibc-ad483238a1ef7bce6d8534a84ba548c455d1631e.tar.gz
glibc-ad483238a1ef7bce6d8534a84ba548c455d1631e.tar.xz
glibc-ad483238a1ef7bce6d8534a84ba548c455d1631e.zip
Update.
	* inet/arpa/inet.h (inet_addr): Change return type to in_addr_t.
	(inet_lnaof): Likewise.
	(inet_netof): Likewise.
	(inet_network): Likewise.
	(inet_aton): Likewise.
	(inet_makeaddr): Change parameter types to in_addr_t.
	(inet_neta): Likewise.
	(inet_ntop): Change type of last parameter to socklen_t.
	(inet_aton): Only make available if __USE_MISC.
	(inet_neta): Likewise.
	(inet_net_ntop): Likewise.
	(inet_net_pton): Likewise.
	(inet_nsap_ntoa): Likewise.

	* inet/in.h: Define in_port_t type.
	Define in_addr_t type.
	(struct in_addr): Use in_addr_t in definition.
	(IN_CLASSA): Use cast to in_addr_t.
	(IN_CLASSB): Likewise.
	(IN_CLASSC): Likewise.
	(IN_CLASSD): Likewise.
	(IN_EXPERIMENTAL): Likewise.
	(IN_BADCLASS): Likewise.
	(INADDR_ANY): Likewise.
	(INADDR_BROADCAST): Likewise.
	(INADDR_NONE): Likewise.
	(INADDR_LOOPBACK): Likewise.
	(INADDR_UNSPEC_GROUP): Likewise.
	(INADDR_ALLHOSTS_GROUP): Likewise.
	(INADDR_ALLRTRS_GROUP): Likewise.
	(INADDR_MAX_LOCAL_GROUP): Likewise.
	(struct sockaddr_in): Use in_port_t for sin_port element.
	(struct sockaddr_in6): Use in_port_t for sin6_port element.
	Use uint8_t instead of u_int8_t.

	* resolv/inet_addr.c (inet_addr): Change return type to in_addr_t.
	Call __inet_aton instead of inet_aton.
	(__inet_aton): Renamed from inet_aton.  Add weak alias under old name.

	* resolv/netdb.h (gethostbyname2): Define only is __USE_MISC.
	(innetgr): Likewise.
	(struct addrinfo): Use socklen_t for ai_addrlen element.

	* sysdeps/unix/sysv/linux/bits/in.h (IPV6_MTU_DISCOVER, IPV6_MTU,
	IPV6_RECVERR): New defines.
Diffstat (limited to 'resolv/inet_addr.c')
-rw-r--r--resolv/inet_addr.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/resolv/inet_addr.c b/resolv/inet_addr.c
index 60f0cbe3b4..48373b2060 100644
--- a/resolv/inet_addr.c
+++ b/resolv/inet_addr.c
@@ -74,13 +74,13 @@ static char rcsid[] = "$Id$";
  * Ascii internet address interpretation routine.
  * The value returned is in network order.
  */
-u_int32_t
+in_addr_t
 inet_addr(cp)
 	register const char *cp;
 {
 	struct in_addr val;
 
-	if (inet_aton(cp, &val))
+	if (__inet_aton(cp, &val))
 		return (val.s_addr);
 	return (INADDR_NONE);
 }
@@ -92,13 +92,13 @@ inet_addr(cp)
  * This replaces inet_addr, the return value from which
  * cannot distinguish between failure and a local broadcast address.
  */
-int
-inet_aton(cp, addr)
+in_addr_t
+__inet_aton(cp, addr)
 	const char *cp;
 	struct in_addr *addr;
 {
-	static const u_int32_t max[4] = { 0xffffffff, 0xffffff, 0xffff, 0xff };
-	register u_int32_t val;	/* changed from u_long --david */
+	static const in_addr_t max[4] = { 0xffffffff, 0xffffff, 0xffff, 0xff };
+	register in_addr_t val;
 #ifndef _LIBC
 	register int base;
 #endif
@@ -207,3 +207,4 @@ ret_0:
 #endif
 	return (0);
 }
+weak_alias (__inet_aton, inet_aton)