New submission from zouguangxian:
in Microsoft SDKs\Windows\v6.0A\Include\ws2tcpip.h, inet_pton was
defined when NTDDI_VERSION >= NTDDI_LONGHORN with the following lines:
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
WINSOCK_API_LINKAGE
INT
WSAAPI
inet_pton(
__in INT Family,
__in PCSTR pszAddrString,
__out_bcount(sizeof(IN6_ADDR)) PVOID pAddrBuf
);
... ...
so in socketmodule.c, inet_pton should not be defined in such a
situation.
----------
components: Library (Lib)
files: socketmodule.c.patch
messages: 57639
nosy: weck
severity: normal
status: open
title: inet_pton redefined while building with windows SDK 6.0
type: compile error
versions: Python 2.6
Added file: http://bugs.python.org/file8775/socketmodule.c.patch
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1464>
__________________________________
Index: socketmodule.c
===================================================================
--- socketmodule.c (revision 59052)
+++ socketmodule.c (working copy)
@@ -297,9 +297,11 @@
#endif
#ifndef HAVE_INET_PTON
+#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
+#endif
#ifdef __APPLE__
/* On OS X, getaddrinfo returns no error indication of lookup
@@ -5039,7 +5041,7 @@
#ifndef HAVE_INET_PTON
-
+#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 */
@@ -5072,5 +5074,5 @@
/* Should set errno to EAFNOSUPPORT */
return NULL;
}
-
#endif
+#endif
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com