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.
This commit is contained in:
Kristján Valur Jónsson 2007-05-03 20:27:03 +00:00
parent 170eee9d6a
commit f030394de3
7 changed files with 36 additions and 73 deletions

View file

@ -2073,9 +2073,9 @@ count_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *
count_next(countobject *lz)
{
if (lz->cnt == LONG_MAX) {
if (lz->cnt == PY_SSIZE_T_MAX) {
PyErr_SetString(PyExc_OverflowError,
"cannot count beyond LONG_MAX");
"cannot count beyond PY_SSIZE_T_MAX");
return NULL;
}
return PyInt_FromSsize_t(lz->cnt++);