2.4.2 on AIX fails compiling _codecs_cn.c

Paul Watson pwatson at redlinepy.com
Wed Nov 23 19:13:30 EST 2005


Martin v. Löwis wrote:
> Paul Watson wrote:
> 
>> Any ideas why ./Modules/cjkcodecs/_codecs_cn.c fails to compile?  It 
>> appears that the CODEC_STATELESS macro is concatenating 'hz' with a 
>> number and text.
> 
> 
> More likely, hz is already defined to be 100, then forming 100_encode.
> 
> It would be best if you could find out what AIX header file defines
> hz to be 100, and whether there is any way to supress that definition.
> 
> Regards,
> Martin

Here are the /usr/include/*.h files that include sys/m_param.h

$ grep sys/m_param $(find . -name "*.h")
./sys/pthdebug.h:#include <sys/m_param.h>   /* _NGPRS, _NFPRS */
./sys/context.h:#include <sys/m_param.h>
./sys/mstsave.h:#include <sys/m_param.h>    /* for machine dependent 
defines*/
./sys/param.h:#include <sys/m_param.h>
./sys/proc.h:#include <sys/m_param.h>
./sys/sched.h:#include <sys/m_param.h>

Can we #undef _ALL_SOURCE for _codecs_cn.c compilation?

There is a description in sys/context.h that seems to suggest that it is 
an internal vs. external definition issue.

    +44  /*
    +45   * XPG4.2 requires structures and structure elements to be 
defined such
    +46   * that they do not pollute the namespace.  _ALL_SOURCE 
contains the
    +47   * kernel version, while not _ALL_SOURCE contains the sanitized 
versions.
    +48   */



More information about the Python-list mailing list