summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-11-20 06:51:17 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-11-20 06:51:17 (GMT)
commit96e7b3db657e17f90b1569018942f5c7371832c8 (patch)
tree83d2d853af3e1dc5def48f4f40c1c5dc82e5f0f1
parentad32deb20eba432fcf6dbd095c25917fa6077ff2 (diff)
downloadcpython-96e7b3db657e17f90b1569018942f5c7371832c8.zip
cpython-96e7b3db657e17f90b1569018942f5c7371832c8.tar.gz
cpython-96e7b3db657e17f90b1569018942f5c7371832c8.tar.bz2
The patch from weck does a better job than my original idea. Thanks!
-rw-r--r--Modules/socketmodule.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index f5ad292..9f312ea 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -285,8 +285,7 @@ typedef size_t socklen_t;
#endif
#ifndef HAVE_INET_PTON
-#if !(defined(_MSC_VER) && _MSC_VER>1499)
-/* Don't redefine inet_pton in VS2008 */
+#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_LONGHORN)
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
@@ -4805,8 +4804,7 @@ init_socket(void)
#ifndef HAVE_INET_PTON
-#if !(defined(_MSC_VER) && _MSC_VER>1499)
-/* Don't redefine inet_pton in VS2008 */
+#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_LONGHORN)
/* Simplistic emulation code for inet_pton that only works for IPv4 */
/* These are not exposed because they do not set errno properly */