diff Modules/socketmodule.c @ 43874:6b012f01a889

Fix for VS 2008 Although WS2_32.dll doesn't have inet_pton the definition conflicts with ws2tcpip.h.
author Christian Heimes <christian@cheimes.de>
date Thu, 15 Nov 2007 23:37:07 +0000
parents 0d462d789b18
children 1165d261fb05
line wrap: on
line diff
--- a/Modules/socketmodule.c	Thu Nov 15 23:19:43 2007 +0000
+++ b/Modules/socketmodule.c	Thu Nov 15 23:37:07 2007 +0000
@@ -285,9 +285,12 @@
 #endif
 
 #ifndef HAVE_INET_PTON
+#if !(defined(_MSC_VER) && _MSC_VER>1499)
+/* Don't redefine inet_pton in VS2008 */
 int inet_pton(int af, const char *src, void *dst);
 const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
 #endif
+#endif
 
 #ifdef __APPLE__
 /* On OS X, getaddrinfo returns no error indication of lookup
@@ -4868,6 +4871,8 @@
 
 
 #ifndef HAVE_INET_PTON
+#if !(defined(_MSC_VER) && _MSC_VER>1499)
+/* Don't redefine inet_pton in VS2008 */
 
 /* Simplistic emulation code for inet_pton that only works for IPv4 */
 /* These are not exposed because they do not set errno properly */
@@ -4903,3 +4908,4 @@
 }
 
 #endif
+#endif