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: CODESET Doesn't Infer ERA et al.
Type: Stage:
Components: Build Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: loewis Nosy List: loewis, mattbehrens, mwh, ralph
Priority: normal Keywords:

Created on 2002-03-23 23:31 by ralph, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
langinfo.h ralph, 2002-03-23 23:31 AIX 3.2's langinfo.h File.
Messages (7)
msg9931 - (view) Author: Ralph Corderoy (ralph) Date: 2002-03-23 23:31
Under AIX 3.2, /usr/include/langinfo.h contains

    #define CODESET 49

but doesn't mention any of

    T_FMT_AMPM ERA ERA_D_FMT ERA_D_T_FMT ERA_T_FMT
    ALT_DIGITS YESEXPR NOEXPR

causing compilation of Modules/_localemodule.c to fail 
as these are all assumed if CODESET is defined (line
487).

Not au fait with the specifics of locale I can only 
suggest a different preprocessor test is used.  At 
worse case, a #ifdef conditional for each of the 
symbols above, only using them if they're defined.
msg9932 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-03-27 12:17
Logged In: YES 
user_id=21627

This has been fixed in _localemodule.c 2.28. IMO, it is not
critical enough for 2.2.1, but a backport of the patch to
2.2.2 will be considered.
msg9933 - (view) Author: Matt Behrens (mattbehrens) Date: 2002-04-19 13:25
Logged In: YES 
user_id=240525

This was indeed backported to 2.2.1 by mwh and it is
breaking the build on OpenBSD.  We don't have CODESET, but
we do have T_FMT_AMPM; however we don't have ERA, ERA_D_FMT,
ERA_D_T_FMT, ERA_T_FMT, or ALT_DIGITS.

I don't understand locale well enough to tell what I do and
do not need out of these.  Prior to this, the fact that
CODESET was not defined was sufficient to take out everything.

I'd like to coordinate to get a proper fix that can
hopefully be in 2.2.2. (I'm the OpenBSD package maintainer
for python.)  Perhaps it is more proper to nest the
T_FMT_AMPM-tested stuff inside the CODESET ifdef?
msg9934 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2002-04-19 13:43
Logged In: YES 
user_id=6656

I love unix.

Can you come up with a patch?

Sorry, lets try and get this right for 222...
msg9935 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-04-19 14:50
Logged In: YES 
user_id=21627

I think the proper fix is to not group them at all, but to
check each of them individually. A patch would be
appreciated: Just split the T_FMT_AMPM block; I'd still
delay ifdefing the others until we get problem reports for
those as well.

If you can, please port the patch for both 2.3 and 2.2. Put
in a comment giving the rationale for the split.
msg9936 - (view) Author: Matt Behrens (mattbehrens) Date: 2002-04-19 16:34
Logged In: YES 
user_id=240525

Attached.

All tests run OK with this patch.

Patch is here, since I can't attach to closed bugs:
http://sourceforge.net/tracker/?group_id=5470&atid=305470&func=detail&aid=546194
msg9937 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-04-19 21:07
Logged In: YES 
user_id=21627

Patch committed as _localemodule.c 2.30 and 2.25.6.3
History
Date User Action Args
2022-04-10 16:05:08adminsetgithub: 36319
2002-03-23 23:31:06ralphcreate