From: Hye-Shik Chang Date: Mon, 12 Dec 2005 11:48:32 +0000 (+0000) Subject: Bug #1290333: Added a workaround for cjkcodecs' _codecs_cn module X-Git-Tag: v2.4.3c1~191 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e708f900afb225fb3c3b34aad14c4c93ff29d483;p=thirdparty%2FPython%2Fcpython.git Bug #1290333: Added a workaround for cjkcodecs' _codecs_cn module build problem on AIX. --- diff --git a/Misc/NEWS b/Misc/NEWS index a630755b731e..01ddf7114d16 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -32,6 +32,9 @@ Core and builtins Extension Modules ----------------- +- Bug #1290333: Added a workaround for cjkcodecs' _codecs_cn build + problem on AIX. + - Bug #869197: os.setgroups rejects long integer arguments - Bug #1344508, Fix UNIX mmap leaking file descriptors diff --git a/Modules/cjkcodecs/_codecs_cn.c b/Modules/cjkcodecs/_codecs_cn.c index ac36b64372ec..9a885bbb3c3f 100644 --- a/Modules/cjkcodecs/_codecs_cn.c +++ b/Modules/cjkcodecs/_codecs_cn.c @@ -8,6 +8,14 @@ #include "cjkcodecs.h" #include "mappings_cn.h" +/** + * hz is predefined as 100 on AIX. So we undefine it to avoid + * conflict against hz codec's. + */ +#ifdef _AIX +#undef hz +#endif + #define GBK_PREDECODE(dc1, dc2, assi) \ if ((dc1) == 0xa1 && (dc2) == 0xaa) (assi) = 0x2014; \ else if ((dc1) == 0xa8 && (dc2) == 0x44) (assi) = 0x2015; \