]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
checkpoint
authorMark Andrews <marka@isc.org>
Mon, 2 Apr 2001 07:03:56 +0000 (07:03 +0000)
committerMark Andrews <marka@isc.org>
Mon, 2 Apr 2001 07:03:56 +0000 (07:03 +0000)
lib/bind/configure.in
lib/bind/port_after.h.in

index 583af2c7c4da2b0a7aa305339faf3d8fe0c351bf..4c0b7257e4794516c1fd1f851f847e8679f29678 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.5 $)
+AC_REVISION($Revision: 1.6 $)
 
 AC_INIT(resolv/herror.c)
 AC_PREREQ(2.13)
@@ -935,8 +935,7 @@ esac
 #
 case "$found_ipv6" in
        yes)
-               ISC_PLATFORM_HAVEIPV6="#define ISC_PLATFORM_HAVEIPV6 1"
-               LWRES_PLATFORM_HAVEIPV6="#define LWRES_PLATFORM_HAVEIPV6 1"
+               HAS_INET6_STRUCTS="#define HAS_INET6_STRUCTS 1"
 
                AC_MSG_CHECKING(for in6_addr)
                AC_TRY_COMPILE([
@@ -948,12 +947,10 @@ $isc_netinet6in6_hack
 ],
 [struct in6_addr in6; return (0);],
                [AC_MSG_RESULT(yes)
-                ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6"
-                LWRES_PLATFORM_HAVEINADDR6="#undef LWRES_PLATFORM_HAVEINADDR6"
+                HAS_IN_ADDR6="#undef HAS_IN_ADDR6"
                 isc_in_addr6_hack=""],
                [AC_MSG_RESULT(no)
-                ISC_PLATFORM_HAVEINADDR6="#define ISC_PLATFORM_HAVEINADDR6 1"
-                LWRES_PLATFORM_HAVEINADDR6="#define LWRES_PLATFORM_HAVEINADDR6 1"
+                HAS_IN_ADDR6="#define HAS_IN_ADDR6 1"
                 isc_in_addr6_hack="#define in6_addr in_addr6"])
 
                AC_MSG_CHECKING(for in6addr_any)
@@ -1003,8 +1000,7 @@ $isc_netinet6in6_hack
                         ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"])
                ;;
        no)
-               ISC_PLATFORM_HAVEIPV6="#undef ISC_PLATFORM_HAVEIPV6"
-               LWRES_PLATFORM_HAVEIPV6="#undef LWRES_PLATFORM_HAVEIPV6"
+               HAS_INET6_STRUCTS="#undef HAS_INET6_STRUCTS"
                ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
                LWRES_PLATFORM_NEEDIN6ADDRANY="#undef LWRES_PLATFORM_NEEDIN6ADDRANY"
                ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
@@ -1016,14 +1012,12 @@ $isc_netinet6in6_hack
                ;;
 esac
 
-AC_SUBST(ISC_PLATFORM_HAVEIPV6)
-AC_SUBST(LWRES_PLATFORM_HAVEIPV6)
+AC_SUBST(HAS_INET6_STRUCTS)
 AC_SUBST(ISC_PLATFORM_NEEDNETINETIN6H)
 AC_SUBST(LWRES_PLATFORM_NEEDNETINETIN6H)
 AC_SUBST(ISC_PLATFORM_NEEDNETINET6IN6H)
 AC_SUBST(LWRES_PLATFORM_NEEDNETINET6IN6H)
-AC_SUBST(ISC_PLATFORM_HAVEINADDR6)
-AC_SUBST(LWRES_PLATFORM_HAVEINADDR6)
+AC_SUBST(HAS_IN_ADDR6)
 AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRANY)
 AC_SUBST(LWRES_PLATFORM_NEEDIN6ADDRANY)
 AC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO)
index 5c7771aa831c285956270c6ea5a6e5cd85641771..3bead72f87f7de701cef83c1904c17a1484c5a25 100644 (file)
@@ -5,8 +5,53 @@
 @HAVE_SA_LEN@
 @HAVE_MINIMUM_IFREQ@
 @NEED_DAEMON@
+@HAS_INET6_STRUCTS@
+@HAS_IN_ADDR6@
 
 /* XXX sunos and cygwin needs O_NDELAY */
 #define PORT_NONBLOCK O_NONBLOCK
 
+/*
+ * We need to know the IPv6 address family number even on IPv4-only systems.
+ * Note that this is NOT a protocol constant, and that if the system has its
+ * own AF_INET6, different from ours below, all of BIND's libraries and
+ * executables will need to be recompiled after the system <sys/socket.h>
+ * has had this type added.  The type number below is correct on most BSD-
+ * derived systems for which AF_INET6 is defined.
+ */
+#ifndef AF_INET6
+#define AF_INET6        24
+#endif
+
+#ifndef PF_INET6
+#define PF_INET6        AF_INET6
+#endif
+
+#ifdef HAS_IN_ADDR6
+/* Map to pre-RFC structure. */
+#define in6_addr in_addr6
+#endif
+
+#ifndef HAS_INET6_STRUCTS
+/* Replace with structure from later rev of O/S if known. */
+struct in6_addr {
+        u_int8_t        s6_addr[16];
+};
+
+/* Replace with structure from later rev of O/S if known. */
+struct sockaddr_in6 {
+#ifdef  HAVE_SA_LEN
+        u_int8_t        sin6_len;       /* length of this struct */
+        u_int8_t        sin6_family;    /* AF_INET6 */
+#else
+        u_int16_t       sin6_family;    /* AF_INET6 */
+#endif
+        u_int16_t       sin6_port;      /* transport layer port # */
+        u_int32_t       sin6_flowinfo;  /* IPv6 flow information */
+        struct in6_addr sin6_addr;      /* IPv6 address */
+        u_int32_t       sin6_scope_id;  /* set of interfaces for a scope */
+};
+#endif  /* HAS_INET6_STRUCTS */
+
+
 #endif