diff options
author | Christian Heimes <christian@cheimes.de> | 2007-11-20 06:51:17 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-11-20 06:51:17 (GMT) |
commit | 96e7b3db657e17f90b1569018942f5c7371832c8 (patch) | |
tree | 83d2d853af3e1dc5def48f4f40c1c5dc82e5f0f1 | |
parent | ad32deb20eba432fcf6dbd095c25917fa6077ff2 (diff) | |
download | cpython-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.c | 6 |
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 */ |