summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-08-03 08:52:46 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-08-03 08:52:46 (GMT)
commitcbcff93d49ad45a6bbdc331c0596ee4b5631dfe4 (patch)
treef5662d148566ee8a01330ac2fd020acc5a82c0a0
parenta41276956d9c269f42dd9d57561475160fe22031 (diff)
downloadcpython-cbcff93d49ad45a6bbdc331c0596ee4b5631dfe4.zip
cpython-cbcff93d49ad45a6bbdc331c0596ee4b5631dfe4.tar.gz
cpython-cbcff93d49ad45a6bbdc331c0596ee4b5631dfe4.tar.bz2
Restore compilation on MSVC++ 6.0
-rw-r--r--Modules/socketmodule.c4
-rw-r--r--PC/pyconfig.h6
2 files changed, 8 insertions, 2 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 757dcc6..30159d2 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -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);
diff --git a/PC/pyconfig.h b/PC/pyconfig.h
index 2109d22..495d90c 100644
--- a/PC/pyconfig.h
+++ b/PC/pyconfig.h
@@ -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