[Python-bugs-list] [ python-Bugs-534153 ] CODESET Doesn't Infer ERA et al.

noreply@sourceforge.net noreply@sourceforge.net
Fri, 19 Apr 2002 06:25:25 -0700


Bugs item #534153, was opened at 2002-03-23 18:31
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=534153&group_id=5470

Category: Build
Group: Python 2.3
Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Ralph Corderoy (ralph)
Assigned to: Martin v. Löwis (loewis)
Summary: CODESET Doesn't Infer ERA et al.

Initial Comment:
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.


----------------------------------------------------------------------

Comment By: Matt Behrens (mattbehrens)
Date: 2002-04-19 09:25

Message:
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?

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2002-03-27 07:17

Message:
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.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=534153&group_id=5470