[Python-checkins] commit of r41647 - in python: branches/release24-maint/Misc/NEWS branches/release24-maint/Modules/cjkcodecs/_codecs_cn.c trunk/Misc/NEWS trunk/Modules/cjkcodecs/_codecs_cn.c
hyeshik.chang
python-checkins at python.org
Mon Dec 12 12:48:34 CET 2005
Author: hyeshik.chang
Date: Mon Dec 12 12:48:32 2005
New Revision: 41647
Modified:
python/branches/release24-maint/Misc/NEWS
python/branches/release24-maint/Modules/cjkcodecs/_codecs_cn.c
python/trunk/Misc/NEWS
python/trunk/Modules/cjkcodecs/_codecs_cn.c
Log:
Bug #1290333: Added a workaround for cjkcodecs' _codecs_cn module
build problem on AIX.
Modified: python/branches/release24-maint/Misc/NEWS
==============================================================================
--- python/branches/release24-maint/Misc/NEWS (original)
+++ python/branches/release24-maint/Misc/NEWS Mon Dec 12 12:48:32 2005
@@ -32,6 +32,9 @@
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
Modified: python/branches/release24-maint/Modules/cjkcodecs/_codecs_cn.c
==============================================================================
--- python/branches/release24-maint/Modules/cjkcodecs/_codecs_cn.c (original)
+++ python/branches/release24-maint/Modules/cjkcodecs/_codecs_cn.c Mon Dec 12 12:48:32 2005
@@ -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; \
Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS (original)
+++ python/trunk/Misc/NEWS Mon Dec 12 12:48:32 2005
@@ -186,6 +186,9 @@
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
Modified: python/trunk/Modules/cjkcodecs/_codecs_cn.c
==============================================================================
--- python/trunk/Modules/cjkcodecs/_codecs_cn.c (original)
+++ python/trunk/Modules/cjkcodecs/_codecs_cn.c Mon Dec 12 12:48:32 2005
@@ -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; \
More information about the Python-checkins
mailing list