summaryrefslogtreecommitdiffstats
path: root/Modules/cjkcodecs
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)
commite708f900afb225fb3c3b34aad14c4c93ff29d483 (patch)
tree4c9c80f8b3ea70c41eccb28b8c990d72109e7542 /Modules/cjkcodecs
parent825ff5aaee6317313ce2fe258f449572d44f631e (diff)
downloadcpython-e708f900afb225fb3c3b34aad14c4c93ff29d483.zip
cpython-e708f900afb225fb3c3b34aad14c4c93ff29d483.tar.gz
cpython-e708f900afb225fb3c3b34aad14c4c93ff29d483.tar.bz2
Bug #1290333: Added a workaround for cjkcodecs' _codecs_cn module
build problem on AIX.
Diffstat (limited to 'Modules/cjkcodecs')
-rw-r--r--Modules/cjkcodecs/_codecs_cn.c8
1 files changed, 8 insertions, 0 deletions
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; \