Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c5c57e6

Browse files
committed
Bug #1290333: Added a workaround for cjkcodecs' _codecs_cn module
build problem on AIX.
1 parent e569fb5 commit c5c57e6

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,9 @@ Core and builtins
186186
Extension Modules
187187
-----------------
188188

189+
- Bug #1290333: Added a workaround for cjkcodecs' _codecs_cn build
190+
problem on AIX.
191+
189192
- Bug #869197: os.setgroups rejects long integer arguments
190193

191194
- Bug #1346533, select.poll() doesn't raise an error if timeout > sys.maxint

Modules/cjkcodecs/_codecs_cn.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88
#include "cjkcodecs.h"
99
#include "mappings_cn.h"
1010

11+
/**
12+
* hz is predefined as 100 on AIX. So we undefine it to avoid
13+
* conflict against hz codec's.
14+
*/
15+
#ifdef _AIX
16+
#undef hz
17+
#endif
18+
1119
#define GBK_PREDECODE(dc1, dc2, assi) \
1220
if ((dc1) == 0xa1 && (dc2) == 0xaa) (assi) = 0x2014; \
1321
else if ((dc1) == 0xa8 && (dc2) == 0x44) (assi) = 0x2015; \

0 commit comments

Comments
 (0)