]> granicus.if.org Git - python/commitdiff
Restore compilation on MSVC++ 6.0
authorRaymond Hettinger <python@rcn.com>
Tue, 3 Aug 2004 08:52:46 +0000 (08:52 +0000)
committerRaymond Hettinger <python@rcn.com>
Tue, 3 Aug 2004 08:52:46 +0000 (08:52 +0000)
Modules/socketmodule.c
PC/pyconfig.h

index 757dcc61c50247bab7f1795a1c8d764599301478..30159d2c048efbf4e7c0e4851d807e0be92710ba 100644 (file)
@@ -281,6 +281,10 @@ int h_errno; /* not used */
 #include "addrinfo.h"
 #endif
 
+#if defined(_MSC_VER) && _MSC_VER == 1200
+#include "addrinfo.h"
+#endif
+
 #ifndef HAVE_INET_PTON
 int inet_pton(int af, const char *src, void *dst);
 const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
index 2109d22959a9e47def2bcf9c053221d0d8b3831e..495d90cfbfbc5abdda93dc3248eaa0c604cbd845 100644 (file)
@@ -267,10 +267,12 @@ Py_NO_ENABLE_SHARED to find out.  Also support MS_NO_COREDLL for b/w compat */
 #define SIZEOF_LONG 4
 #define SIZEOF_LONG_LONG 8
 
-/* Atleast VC 7.1 has them. If some compiler does not provide them,
-   #ifdef appropriately .*/
+/* VC 7.1 has them and VC 6.0 does not.  VC 6.0 has a version number of 1200.
+   If some compiler does not provide them, modify the #if appropriately. */
+#if _MSC_VER != 1200
 #define HAVE_UINTPTR_T 1
 #define HAVE_INTPTR_T 1
+#endif
 
 #endif