summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
Diffstat (limited to 'PC')
-rw-r--r--PC/config.c12
-rw-r--r--PC/make_versioninfo.c5
-rw-r--r--PC/pyconfig.h21
3 files changed, 28 insertions, 10 deletions
diff --git a/PC/config.c b/PC/config.c
index e8cb1d2..b9978ef 100644
--- a/PC/config.c
+++ b/PC/config.c
@@ -6,21 +6,21 @@
#include "Python.h"
extern void initarray(void);
-#ifndef MS_WIN64
+#ifndef MS_WINI64
extern void initaudioop(void);
#endif
extern void initbinascii(void);
extern void initcmath(void);
extern void initerrno(void);
extern void initgc(void);
-#ifndef MS_WIN64
+#ifndef MS_WINI64
extern void initimageop(void);
#endif
extern void initmath(void);
extern void init_md5(void);
extern void initnt(void);
extern void initoperator(void);
-#ifndef MS_WIN64
+#ifndef MS_WINI64
extern void initrgbimg(void);
#endif
extern void initsignal(void);
@@ -82,7 +82,7 @@ struct _inittab _PyImport_Inittab[] = {
{"_ast", init_ast},
{"atexit", initatexit},
#ifdef MS_WINDOWS
-#ifndef MS_WIN64
+#ifndef MS_WINI64
{"audioop", initaudioop},
#endif
#endif
@@ -90,14 +90,14 @@ struct _inittab _PyImport_Inittab[] = {
{"cmath", initcmath},
{"errno", initerrno},
{"gc", initgc},
-#ifndef MS_WIN64
+#ifndef MS_WINI64
{"imageop", initimageop},
#endif
{"math", initmath},
{"_md5", init_md5},
{"nt", initnt}, /* Use the NT os functions, not posix */
{"operator", initoperator},
-#ifndef MS_WIN64
+#ifndef MS_WINI64
{"rgbimg", initrgbimg},
#endif
{"signal", initsignal},
diff --git a/PC/make_versioninfo.c b/PC/make_versioninfo.c
index 41c026f..b9f9b88 100644
--- a/PC/make_versioninfo.c
+++ b/PC/make_versioninfo.c
@@ -27,7 +27,12 @@ int main(int argc, char **argv)
PY_MICRO_VERSION*1000 + PY_RELEASE_LEVEL*10 + PY_RELEASE_SERIAL);
printf("#define MS_DLL_ID \"%d.%d\"\n",
PY_MAJOR_VERSION, PY_MINOR_VERSION);
+ printf("#ifndef _DEBUG\n");
printf("#define PYTHON_DLL_NAME \"python%d%d.dll\"\n",
PY_MAJOR_VERSION, PY_MINOR_VERSION);
+ printf("#else\n");
+ printf("#define PYTHON_DLL_NAME \"python%d%d_d.dll\"\n",
+ PY_MAJOR_VERSION, PY_MINOR_VERSION);
+ printf("#endif\n");
return 0;
}
diff --git a/PC/pyconfig.h b/PC/pyconfig.h
index c432fa8..cecc575 100644
--- a/PC/pyconfig.h
+++ b/PC/pyconfig.h
@@ -128,6 +128,8 @@ MS_CORE_DLL.
defined on Win32 *and* Win64. Win32 only code must therefore be
guarded as follows:
#if defined(MS_WIN32) && !defined(MS_WIN64)
+ Some modules are disabled on Itanium processors, therefore we
+ have MS_WINI64 set for those targets, otherwise MS_WINX64
*/
#ifdef _WIN64
#define MS_WIN64
@@ -135,17 +137,28 @@ MS_CORE_DLL.
/* set the COMPILER */
#ifdef MS_WIN64
-#ifdef _M_IX86
-#define COMPILER _Py_PASTE_VERSION("64 bit (Intel)")
-#elif defined(_M_IA64)
+#if defined(_M_IA64)
#define COMPILER _Py_PASTE_VERSION("64 bit (Itanium)")
-#elif defined(_M_AMD64)
+#define MS_WINI64
+#elif defined(_M_X64)
#define COMPILER _Py_PASTE_VERSION("64 bit (AMD64)")
+#define MS_WINX64
#else
#define COMPILER _Py_PASTE_VERSION("64 bit (Unknown)")
#endif
#endif /* MS_WIN64 */
+/* set the version macros for the windows headers */
+#ifdef MS_WINX64
+/* 64 bit only runs on XP or greater */
+#define _WIN32_WINNT 0x0501
+#define WINVER 0x0501
+#else
+/* NT 4.0 or greater required otherwise */
+#define _WIN32_WINNT 0x0400
+#define WINVER 0x0400
+#endif
+
/* _W64 is not defined for VC6 or eVC4 */
#ifndef _W64
#define _W64