]> granicus.if.org Git - python/commitdiff
Bug #1290333: Added a workaround for cjkcodecs' _codecs_cn module
authorHye-Shik Chang <hyeshik@gmail.com>
Mon, 12 Dec 2005 11:48:32 +0000 (11:48 +0000)
committerHye-Shik Chang <hyeshik@gmail.com>
Mon, 12 Dec 2005 11:48:32 +0000 (11:48 +0000)
build problem on AIX.

Misc/NEWS
Modules/cjkcodecs/_codecs_cn.c

index c6092bc293ae15e725243002d7dc8b76d10e27a4..691774ffb6d01c875ddcfe13d99c5c5ccc47df4e 100644 (file)
--- 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
index ac36b64372ec7c46ea9a01e7f205c7f8e554e5eb..9a885bbb3c3f6d01b0973b7abbf7289b99db9594 100644 (file)
@@ -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; \