This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: cjkcodec compile error under AIX 5.2 on symbol 100_encode
Type: Stage:
Components: Build Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: hyeshik.chang Nosy List: dmeranda, hyeshik.chang
Priority: normal Keywords:

Created on 2005-09-13 17:55 by dmeranda, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg26273 - (view) Author: Deron Meranda (dmeranda) Date: 2005-09-13 17:55
Trying to compile Python 2.4.1 under AIX 5.2 with the
native cc compiler.  When compiling the module
cjkcodecs the compiler will fail with these errors on
the source file Modules/cjkcodecs/_codecs_cn.c

building '_codecs_cn' extension
cc -DNDEBUG -O -I.
-I/home/psgtools/aix52/build/Python-2.4.1/./Include
-I/opt/cmax/psgtools/include
-I/home/psgtools/aix52/build/Python-2.4.1/Include
-I/home/psgtools/aix52/build/Python-2.4.1 -c
/home/psgtools/aix52/build/Python-2.4.1/Modules/cjkcodecs/_codecs_cn.c
-o build/temp.aix-5.2-2.4/_codecs_cn.o
"/home/psgtools/aix52/build/Python-2.4.1/Modules/cjkcodecs/_codecs_cn.c",
line 431.3: 1506-206 (S) Suffix of integer constant
100_encode is not valid.
"/home/psgtools/aix52/build/Python-2.4.1/Modules/cjkcodecs/_codecs_cn.c",
line 431.3: 1506-196 (W) Initialization between types
"int(*)(union {...}*,const void*,const unsigned
long**,unsigned long,unsigned char**,unsigned
long,int)" and "int" is not allowed.

and so on.

This is happening because of the "hz" codec.  Due to
the way the source file uses the C preprocessor macro,
and the fact that the preprocessor symbol "hz" is
predefined as 100 on this platform, it is producing
invalid lecical symbols such as "100_encode".

The simple solution is to insert the following line in
the source file immediately before the first reference
to the name "hz":

  #undef hz
msg26274 - (view) Author: Hyeshik Chang (hyeshik.chang) * (Python committer) Date: 2005-12-12 11:53
Logged In: YES 
user_id=55188

Fixed in r41647. Thank you!
History
Date User Action Args
2022-04-11 14:56:13adminsetgithub: 42367
2005-09-13 17:55:03dmerandacreate