summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHye-Shik Chang <hyeshik@gmail.com>2005-12-12 11:48:32 (GMT)
committerHye-Shik Chang <hyeshik@gmail.com>2005-12-12 11:48:32 (GMT)
commitc5c57e6d98a04dbeba8cdec28d341d869320675c (patch)
treee6e0cb5ef4ec51ad78e7adf89ab2ad94aecf3157
parente569fb5d7116912f2bd71d19e1051905fbbe51f3 (diff)
downloadcpython-c5c57e6d98a04dbeba8cdec28d341d869320675c.zip
cpython-c5c57e6d98a04dbeba8cdec28d341d869320675c.tar.gz
cpython-c5c57e6d98a04dbeba8cdec28d341d869320675c.tar.bz2
Bug #1290333: Added a workaround for cjkcodecs' _codecs_cn module
build problem on AIX.
-rw-r--r--Misc/NEWS3
-rw-r--r--Modules/cjkcodecs/_codecs_cn.c8
2 files changed, 11 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index c6092bc..691774f 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -186,6 +186,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 #1346533, select.poll() doesn't raise an error if timeout > sys.maxint
diff --git a/Modules/cjkcodecs/_codecs_cn.c b/Modules/cjkcodecs/_codecs_cn.c
index ac36b64..9a885bb 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; \