]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Fixes to properly support platforms that do not have IPv6 support.
authorDanny Mayer <mayer@ntp.org>
Sat, 8 Nov 2003 21:49:43 +0000 (16:49 -0500)
committerDanny Mayer <mayer@ntp.org>
Sat, 8 Nov 2003 21:49:43 +0000 (16:49 -0500)
bk: 3fad64f7dh9i2dd-zhusQ9qgNylKqQ

include/isc/ipv6.h
include/ntp_rfc2553.h
libntp/ntp_rfc2553.c
ports/winnt/include/isc/ipv6.h
ports/winnt/include/isc/platform.h

index 18893b7003ce39489328f3bda48a241888cd7f66..6146a43e7855ce223a77c583bae3490db3c6724c 100644 (file)
@@ -102,12 +102,13 @@ struct sockaddr_in6 {
 /*
  * Unspecified
  */
+#ifndef IN6_IS_ADDR_UNSPECIFIED
 #define IN6_IS_ADDR_UNSPECIFIED(a)      \
         (((a)->s6_addr32[0] == 0) &&    \
          ((a)->s6_addr32[1] == 0) &&    \
          ((a)->s6_addr32[2] == 0) &&    \
          ((a)->s6_addr32[3] == 0))
-
+#endif
 /*
  * Loopback
  */
@@ -138,9 +139,10 @@ struct sockaddr_in6 {
 /*
  * Multicast
  */
+#ifndef IN6_IS_ADDR_MULTICAST
 #define IN6_IS_ADDR_MULTICAST(a)       \
        ((a)->s6_addr8[0] == 0xffU)
-
+#endif
 /*
  * Unicast link / site local.
  */
index 28ff004b8808f741bde89c14aca2d5820a52f9f6..bdf592398064644454235b9d25fc8d3f004721fb 100644 (file)
@@ -68,9 +68,7 @@
 #ifndef _NTP_RFC2553_H_
 #define _NTP_RFC2553_H_
 
-#if defined(_SS_MAXSIZE) || defined(_SS_SIZE)
-#define HAVE_IPV6
-#else
+#ifndef ISC_PLATFORM_HAVEIPV6
 
 #include <sys/types.h>
 #include "ntp_types.h"
@@ -250,5 +248,5 @@ int getnameinfo P((const struct sockaddr *, u_int, char *,
 void   freeaddrinfo P((struct addrinfo *));
 char   *gai_strerror P((int));
 
-#endif /* _SS_MAXSIZE */
+#endif /* ISC_PLATFORM_HAVEIPV6 */
 #endif /* !_NTP_RFC2553_H_ */
index 278863085eb4666265f04648895c79795577154c..9b29f8a3f66ae54f2075612b1b09a161d5c87522 100644 (file)
@@ -83,7 +83,7 @@
 #include "ntp_stdlib.h"
 #include "ntp_string.h"
 
-#ifndef HAVE_IPV6
+#ifndef ISC_PLATFORM_HAVEIPV6
 
 #if defined(SYS_WINNT)
 /* XXX This is the preferred way, but for some reason the SunOS compiler
@@ -328,4 +328,4 @@ ipv4_aton(
 #endif
        return (1);
 }
-#endif /* !HAVE_IPV6 */
+#endif /* !ISC_PLATFORM_HAVEIPV6 */
index 3822731d81a1eaa89e9e6f889b2804e058af56be..3fe77dc73dab3b1243c1e8b71f267db90f739ff6 100644 (file)
@@ -56,13 +56,14 @@ LIBISC_EXTERNAL_DATA extern const struct in_addr6 in6addr_loopback;
  * Unspecified
  */
 
+#ifndef IN6_IS_ADDR_UNSPECIFIED
 #define IN6_IS_ADDR_UNSPECIFIED(a)      \
 *((u_long *)((a)->s6_addr)    ) == 0 && \
 *((u_long *)((a)->s6_addr) + 1) == 0 && \
 *((u_long *)((a)->s6_addr) + 2) == 0 && \
 *((u_long *)((a)->s6_addr) + 3) == 0 \
 )
-
+#endif
 /*
  * Loopback
  */
@@ -95,9 +96,10 @@ LIBISC_EXTERNAL_DATA extern const struct in_addr6 in6addr_loopback;
 /*
  * Multicast
  */
+#ifndef IN6_IS_ADDR_MULTICAST
 #define IN6_IS_ADDR_MULTICAST(a)       \
        ((a)->s6_addr8[0] == 0xffU)
-
+#endif
 /*
  * Unicast link / site local.
  */
index 747e0504dccecc41d871aee84b01bf9e4fc1727d..10e2a012b81f4698db5ce9d0d3d5223686a40f42 100644 (file)
  *** Network.
  ***/
 
+/*
+ * This should not be defined yet until we can support IPV6
+ * on Windows Platforms.
+ *
 #define ISC_PLATFORM_HAVEIPV6
+*/
 #define ISC_PLATFORM_NEEDPORTT
 #undef MSG_TRUNC
 #define ISC_PLATFORM_NEEDNTOP