mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Fix for VS 2008
Although WS2_32.dll doesn't have inet_pton the definition conflicts with ws2tcpip.h.
This commit is contained in:
parent
65f9aced6e
commit
b61506989e
1 changed files with 6 additions and 0 deletions
|
@ -285,9 +285,12 @@ typedef size_t socklen_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_INET_PTON
|
#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);
|
int inet_pton(int af, const char *src, void *dst);
|
||||||
const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
|
const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
/* On OS X, getaddrinfo returns no error indication of lookup
|
/* On OS X, getaddrinfo returns no error indication of lookup
|
||||||
|
@ -4868,6 +4871,8 @@ init_socket(void)
|
||||||
|
|
||||||
|
|
||||||
#ifndef HAVE_INET_PTON
|
#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 */
|
/* Simplistic emulation code for inet_pton that only works for IPv4 */
|
||||||
/* These are not exposed because they do not set errno properly */
|
/* These are not exposed because they do not set errno properly */
|
||||||
|
@ -4903,3 +4908,4 @@ inet_ntop(int af, const void *src, char *dst, socklen_t size)
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue