From: Amaury Forgeot d'Arc <amauryfa@gmail.com>
Date: Thu, 12 Jun 2008 23:03:41 +0000 (+0000)
Subject: Slowly apply part of #2065: py3k can be compiled with VS8.0
X-Git-Tag: v3.0b1~62
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=762681b5152671802d315833a661a79d01f2c5e7;p=python

Slowly apply part of #2065: py3k can be compiled with VS8.0
---

diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 907cc7b671..3f94ebc536 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -5001,8 +5001,12 @@ PyInit__socket(void)
 	PyModule_AddIntConstant(m, "RCVALL_OFF", RCVALL_OFF);
 	PyModule_AddIntConstant(m, "RCVALL_ON", RCVALL_ON);
 	PyModule_AddIntConstant(m, "RCVALL_SOCKETLEVELONLY", RCVALL_SOCKETLEVELONLY);
+#ifdef RCVALL_IPLEVEL
 	PyModule_AddIntConstant(m, "RCVALL_IPLEVEL", RCVALL_IPLEVEL);
+#endif
+#ifdef RCVALL_MAX
 	PyModule_AddIntConstant(m, "RCVALL_MAX", RCVALL_MAX);
+#endif
 #endif /* _MSTCPIP_ */
 
 	/* Initialize gethostbyname lock */
diff --git a/PC/pyconfig.h b/PC/pyconfig.h
index b64561b5a7..0a27ff0cf8 100644
--- a/PC/pyconfig.h
+++ b/PC/pyconfig.h
@@ -158,11 +158,11 @@ WIN32 is still required for the locale module.
 /* set the version macros for the windows headers */
 #ifdef MS_WINX64
 /* 64 bit only runs on XP or greater */
-#define Py_WINVER _WIN32_WINNT_WINXP
+#define Py_WINVER 0x0501 /* _WIN32_WINNT_WINXP */
 #define Py_NTDDI NTDDI_WINXP
 #else
 /* Python 2.6+ requires Windows 2000 or greater */
-#define Py_WINVER _WIN32_WINNT_WIN2K
+#define Py_WINVER 0x0500 /* _WIN32_WINNT_WIN2K */
 #define Py_NTDDI NTDDI_WIN2KSP4
 #endif