From 3f06ea00c68987ce00dd1f48e344a31102306fd1 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Mon, 19 Jun 2006 10:47:30 +0000 Subject: [PATCH] 2006-06-19 Simon Josefsson * inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it. --- lib/ChangeLog | 4 ++++ lib/inet_ntop.c | 10 +--------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index e9d05c0eb..e2ce00d05 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2006-06-19 Simon Josefsson + + * inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it. + 2006-06-19 Paul Eggert * alloca_.h (alloca) [defined alloca]: Don't define or declare. diff --git a/lib/inet_ntop.c b/lib/inet_ntop.c index fc84fa8c1..34574be07 100644 --- a/lib/inet_ntop.c +++ b/lib/inet_ntop.c @@ -1,5 +1,5 @@ /* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form - Copyright (c) 2005 Free Software Foundation, Inc. + Copyright (c) 2005, 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -56,9 +56,7 @@ */ typedef int verify_int_size[2 * sizeof (int) - 7]; -#if HAVE_IPV4 static const char *inet_ntop4 (const unsigned char *src, char *dst, socklen_t size); -#endif #if HAVE_IPV6 static const char *inet_ntop6 (const unsigned char *src, char *dst, socklen_t size); #endif @@ -78,10 +76,8 @@ inet_ntop (int af, const void *restrict src, { switch (af) { -#if HAVE_IPV4 case AF_INET: return (inet_ntop4 (src, dst, cnt)); -#endif #if HAVE_IPV6 case AF_INET6: @@ -95,8 +91,6 @@ inet_ntop (int af, const void *restrict src, /* NOTREACHED */ } -#if HAVE_IPV4 - /* const char * * inet_ntop4(src, dst, size) * format an IPv4 address @@ -127,8 +121,6 @@ inet_ntop4 (const unsigned char *src, char *dst, socklen_t size) return strcpy (dst, tmp); } -#endif - #if HAVE_IPV6 /* const char * -- 2.11.0