diff -duHrp Python-2.4.1.orig/Modules/cjkcodecs/_codecs_cn.c Python-2.4.1/Modules/cjkcodecs/_codecs_cn.c --- Python-2.4.1.orig/Modules/cjkcodecs/_codecs_cn.c 2004-07-17 23:06:27.000000000 -0400 +++ Python-2.4.1/Modules/cjkcodecs/_codecs_cn.c 2005-05-27 04:08:22.000000000 -0400 @@ -8,6 +8,20 @@ #include "cjkcodecs.h" #include "mappings_cn.h" +/* + * hz is defined in AIX as the scheduling freq with a value of 100. This creates + * a problem in this file. HZ is an Internet convention for encoding + * GB (which is commonly used in China and Singapore for writing) + * text. Since this clashes with the #define in AIX, and hz is not + * required here, wrapping the undef in a #ifdef AIX + */ +#ifdef _AIX + #ifdef hz + #undef hz + #endif +#endif + + #define GBK_PREDECODE(dc1, dc2, assi) \ if ((dc1) == 0xa1 && (dc2) == 0xaa) (assi) = 0x2014; \ else if ((dc1) == 0xa8 && (dc2) == 0x44) (assi) = 0x2015; \ diff -duHrp Python-2.4.1.orig/Modules/datetimemodule.c Python-2.4.1/Modules/datetimemodule.c --- Python-2.4.1.orig/Modules/datetimemodule.c 2004-12-19 15:16:57.000000000 -0500 +++ Python-2.4.1/Modules/datetimemodule.c 2005-05-27 04:11:31.000000000 -0400 @@ -970,8 +970,11 @@ typedef enum { */ OFFSET_NAIVE, +/* +* IBM's VisualAge compiler doesn't accept trailing commas +*/ /* time or datetime where utcoffset() doesn't return None */ - OFFSET_AWARE, + OFFSET_AWARE } naivety; /* Classify an object as to whether it's naive or offset-aware. See diff -duHrp Python-2.4.1.orig/Modules/expat/expat.h Python-2.4.1/Modules/expat/expat.h --- Python-2.4.1.orig/Modules/expat/expat.h 2004-08-03 03:06:22.000000000 -0400 +++ Python-2.4.1/Modules/expat/expat.h 2005-05-27 04:12:36.000000000 -0400 @@ -43,7 +43,10 @@ enum XML_Status { #define XML_STATUS_ERROR XML_STATUS_ERROR XML_STATUS_OK = 1, #define XML_STATUS_OK XML_STATUS_OK - XML_STATUS_SUSPENDED = 2, +/* +* IBM's VisualAge compiler doesn't accept trailing commas +*/ + XML_STATUS_SUSPENDED = 2 #define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED }; diff -duHrp Python-2.4.1.orig/Python/thread.c Python-2.4.1/Python/thread.c --- Python-2.4.1.orig/Python/thread.c 2004-10-09 21:58:44.000000000 -0400 +++ Python-2.4.1/Python/thread.c 2005-05-27 04:14:10.000000000 -0400 @@ -97,7 +97,20 @@ void PyThread_init_thread(void) #undef _POSIX_THREADS #endif +/* +* AIX defines THREAD_SAFE and the xlc compiler can't handle +* multiple defines. Hence wrapping the thread_pthread.h +* include in a # define +*/ +#ifdef _AIX #ifdef _POSIX_THREADS +#include +#ifdef _THREAD_SAFE +#undef _THREAD_SAFE +#include "thread_pthread.h" +#endif +#endif +#else #include "thread_pthread.h" #endif