]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 1534] win32/include/isc/net.h conflicts with VC++ 2010 errno.h.
authorDave Hart <hart@ntp.org>
Sat, 24 Apr 2010 05:57:35 +0000 (05:57 +0000)
committerDave Hart <hart@ntp.org>
Sat, 24 Apr 2010 05:57:35 +0000 (05:57 +0000)
[Bug 1535] "restrict -4 default" and "restrict -6 default" ignored.

bk: 4bd2884flWG0Feb9cHu79hyADZLxqA

ChangeLog
lib/isc/win32/include/isc/net.h
ntpd/ntp_parser.c
ntpd/ntp_parser.y

index 2510bf327aceecc61022994a3f4a5be7e0d0e732..673fd93a338e7136152e6fe5bceb57998197d27b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
-* [Bug 1465] Make sure time from TS2100 is not invalid (backport from -dev).
+* [Bug 1465] Make sure time from TS2100 is not invalid (backport from
+  ntp-dev).
 * [Bug 1528] Fix EDITLINE_LIBS link order for ntpq and ntpdc.
+* [Bug 1534] win32/include/isc/net.h conflicts with VC++ 2010 errno.h.
+* [Bug 1535] "restrict -4 default" and "restrict -6 default" ignored.
 * Remove --with-arlib from br-flock.
 
 ---
index b0bba80bb9ba2e931dcb985a11b0a996c09e1da0..33e688238cac95e0e21a6164adcb9d77fbcf75c7 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef ISC_NET_H
 #define ISC_NET_H 1
 
+#include <errno.h>
+
 /*
  * Also define LWRES_IPV6_H to keep it from being included if liblwres is
  * being used, or redefinition errors will occur.
@@ -187,37 +189,65 @@ typedef isc_uint16_t in_port_t;
  * Windows Sockets errors redefined as regular Berkeley error constants.
  * These are usually commented out in Windows NT to avoid conflicts with errno.h.
  * Use the WSA constants instead.
+ * Starting with VC9 (VC++ 2010) many of these are defined incompatibly
+ * by errno.h -- #undef the conflicting values, which are not relevant to
+ * Win32.
  */
 
+#undef EWOULDBLOCK
 #define EWOULDBLOCK             WSAEWOULDBLOCK
+#undef EINPROGRESS
 #define EINPROGRESS             WSAEINPROGRESS
+#undef EALREADY
 #define EALREADY                WSAEALREADY
+#undef ENOTSOCK
 #define ENOTSOCK                WSAENOTSOCK
+#undef EDESTADDRREQ
 #define EDESTADDRREQ            WSAEDESTADDRREQ
+#undef EMSGSIZE
 #define EMSGSIZE                WSAEMSGSIZE
+#undef EPROTOTYPE
 #define EPROTOTYPE              WSAEPROTOTYPE
+#undef ENOPROTOOPT
 #define ENOPROTOOPT             WSAENOPROTOOPT
+#undef EPROTONOSUPPORT
 #define EPROTONOSUPPORT         WSAEPROTONOSUPPORT
 #define ESOCKTNOSUPPORT         WSAESOCKTNOSUPPORT
+#undef EOPNOTSUPP
 #define EOPNOTSUPP              WSAEOPNOTSUPP
 #define EPFNOSUPPORT            WSAEPFNOSUPPORT
+#undef EAFNOSUPPORT
 #define EAFNOSUPPORT            WSAEAFNOSUPPORT
+#undef EADDRINUSE
 #define EADDRINUSE              WSAEADDRINUSE
+#undef EADDRNOTAVAIL
 #define EADDRNOTAVAIL           WSAEADDRNOTAVAIL
+#undef ENETDOWN
 #define ENETDOWN                WSAENETDOWN
+#undef ENETUNREACH
 #define ENETUNREACH             WSAENETUNREACH
+#undef ENETRESET
 #define ENETRESET               WSAENETRESET
+#undef ECONNABORTED
 #define ECONNABORTED            WSAECONNABORTED
+#undef ECONNRESET
 #define ECONNRESET              WSAECONNRESET
+#undef ENOBUFS
 #define ENOBUFS                 WSAENOBUFS
+#undef EISCONN
 #define EISCONN                 WSAEISCONN
+#undef ENOTCONN
 #define ENOTCONN                WSAENOTCONN
 #define ESHUTDOWN               WSAESHUTDOWN
 #define ETOOMANYREFS            WSAETOOMANYREFS
+#undef ETIMEDOUT
 #define ETIMEDOUT               WSAETIMEDOUT
+#undef ECONNREFUSED
 #define ECONNREFUSED            WSAECONNREFUSED
+#undef ELOOP
 #define ELOOP                   WSAELOOP
 #define EHOSTDOWN               WSAEHOSTDOWN
+#undef EHOSTUNREACH
 #define EHOSTUNREACH            WSAEHOSTUNREACH
 #define EPROCLIM                WSAEPROCLIM
 #define EUSERS                  WSAEUSERS
index 3cad059ce1d92b2b5f676d3e32fed527948c2a14..ece73de9eebc874145cd51a9ae3df64aab4dae60 100644 (file)
@@ -2805,7 +2805,7 @@ yyreduce:
                                                estrdup("0.0.0.0"), 
                                                AF_INET),
                                        create_address_node(
-                                               estrdup("255.255.255.255"), 
+                                               estrdup("0.0.0.0"), 
                                                AF_INET),
                                        (yyvsp[(4) - (4)].Queue), 
                                        ip_file->line_no));
@@ -2823,7 +2823,7 @@ yyreduce:
                                                estrdup("::"), 
                                                AF_INET6),
                                        create_address_node(
-                                               estrdup("ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"),
+                                               estrdup("::"), 
                                                AF_INET6),
                                        (yyvsp[(4) - (4)].Queue), 
                                        ip_file->line_no));
index 58b083e75b10a56f361afd9292c4d0b13eb16ab6..38fdf09c439c776e121a91c332bf3459931f04c9 100644 (file)
@@ -677,7 +677,7 @@ access_control_command
                                                estrdup("0.0.0.0"), 
                                                AF_INET),
                                        create_address_node(
-                                               estrdup("255.255.255.255"), 
+                                               estrdup("0.0.0.0"), 
                                                AF_INET),
                                        $4, 
                                        ip_file->line_no));
@@ -690,7 +690,7 @@ access_control_command
                                                estrdup("::"), 
                                                AF_INET6),
                                        create_address_node(
-                                               estrdup("ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"),
+                                               estrdup("::"), 
                                                AF_INET6),
                                        $4, 
                                        ip_file->line_no));