]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1290. [bug] Check that system inet_pton() and inet_ntop() support
authorMark Andrews <marka@isc.org>
Wed, 15 May 2002 07:26:09 +0000 (07:26 +0000)
committerMark Andrews <marka@isc.org>
Wed, 15 May 2002 07:26:09 +0000 (07:26 +0000)
                        AF_INET6.

CHANGES
configure.in

diff --git a/CHANGES b/CHANGES
index 6c62cba8323cdfadf8d2b1a6d15340fa7ca993c9..9fe20a17ba9b30eb3c197dab185c8352f398d1d2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+1290.  [bug]           Check that system inet_pton() and inet_ntop() support
+                       AF_INET6.
+
 1289.  [port]          Openserver: ifconfig.sh support.
 
 1288.  [port]          Openserver: the value FD_SETSIZE depends on whether
index faaf3a515c45d5e5da2ab9232a1cd7937c580599..dbfd3824347120dff7139c4e562b4154c064c731 100644 (file)
@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
 esyscmd([sed "s/^/# /" COPYRIGHT])dnl
 AC_DIVERT_POP()dnl
 
-AC_REVISION($Revision: 1.322 $)
+AC_REVISION($Revision: 1.323 $)
 
 AC_INIT(lib/dns/name.c)
 AC_PREREQ(2.13)
@@ -1199,12 +1199,14 @@ AC_SUBST(ISC_PLATFORM_HAVEIF_LADDRCONF)
 # which provides some (all?) of the desired functions.
 #
 
-AC_MSG_CHECKING([for inet_ntop])
-AC_TRY_LINK([
+AC_MSG_CHECKING([for inet_ntop with IPv6 support])
+AC_TRY_RUN([
 #include <sys/types.h>
+#include <sys/socket.h>
 #include <netinet/in.h>
-#include <arpa/inet.h>],
-        [inet_ntop(0, 0, 0, 0); return (0);],
+#include <arpa/inet.h>
+main() {
+char a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)0);}],
         [AC_MSG_RESULT(yes)
         ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"],
 
@@ -1218,14 +1220,15 @@ AC_TRY_LINK([
 # addresses with less than four octets, like "1.2.3".  Also leading
 # zeros should also be rejected.
 
-AC_MSG_CHECKING([for inet_pton])
+AC_MSG_CHECKING([for working inet_pton with IPv6 support])
 AC_TRY_RUN([
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
-main() { char a[4]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 :
-                           inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 : 0); }],
+main() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 :
+                            inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 : 
+                            (inet_pton(AF_INET6, "::1.2.3.4", a) != 1)); }],
         [AC_MSG_RESULT(yes)
         ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
         [AC_MSG_RESULT(no)