Fix problems in x64 build that were discovered by the testsuite:
- Reenable modules on x64 that had been disabled aeons ago for Itanium.
- Cleared up confusion about compilers for 64 bit windows. There is only Itanium and x64. Added macros MS_WINI64 and MS_WINX64 for those rare cases where it matters, such as the disabling of modules above.
- Set target platform (_WIN32_WINNT and WINVER) to 0x0501 (XP) for x64, and 0x0400 (NT 4.0) otherwise, which are the targeted minimum platforms.
- Fixed thread_nt.h. The emulated InterlockedCompareExchange function didn´t work on x64, probaby due to the lack of a "volatile" specifier. Anyway, win95 is no longer a target platform.
- Itertools module used wrong constant to check for overflow in count()
- PyInt_AsSsize_t couldn't deal with attribute error when accessing the __long__ member.
- PyLong_FromSsize_t() incorrectly specified that the operand were unsigned.
With these changes, the x64 passes the testsuite, for those modules present.
diff --git a/PC/config.c b/PC/config.c
index e1b52a4..6860211 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);
@@ -80,7 +80,7 @@
{"array", initarray},
{"_ast", init_ast},
#ifdef MS_WINDOWS
-#ifndef MS_WIN64
+#ifndef MS_WINI64
{"audioop", initaudioop},
#endif
#endif
@@ -88,14 +88,14 @@
{"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},