diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2002-04-19 21:04:41 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2002-04-19 21:04:41 (GMT) |
commit | 2ea2c9d1c3e74012f61e22246acdce3bfddef9d8 (patch) | |
tree | 70b714fa94922e9535b5701b27fb42e7b2cd511f /Modules/_localemodule.c | |
parent | 4f109c1cf99682bcc23aec3a3bf17fcfa3abd7ac (diff) | |
download | cpython-2ea2c9d1c3e74012f61e22246acdce3bfddef9d8.zip cpython-2ea2c9d1c3e74012f61e22246acdce3bfddef9d8.tar.gz cpython-2ea2c9d1c3e74012f61e22246acdce3bfddef9d8.tar.bz2 |
Patch #546194: Check constants individually. Fixes 534143 on OpenBSD.
Will backport to 2.2.
Diffstat (limited to 'Modules/_localemodule.c')
-rw-r--r-- | Modules/_localemodule.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c index 58d349b..e1f95a1 100644 --- a/Modules/_localemodule.c +++ b/Modules/_localemodule.c @@ -482,19 +482,36 @@ struct langinfo_constant{ LANGINFO(AM_STR), LANGINFO(PM_STR), - /* The following constants are available only with XPG4. AIX 3.2. only has - CODESET. */ + /* The following constants are available only with XPG4, but... + AIX 3.2. only has CODESET. + OpenBSD doesn't have CODESET but has T_FMT_AMPM, and doesn't have + a few of the others. + Solution: ifdef-test them all. */ #ifdef CODESET LANGINFO(CODESET), #endif #ifdef T_FMT_AMPM LANGINFO(T_FMT_AMPM), +#endif +#ifdef ERA LANGINFO(ERA), +#endif +#ifdef ERA_D_FMT LANGINFO(ERA_D_FMT), +#endif +#ifdef ERA_D_T_FMT LANGINFO(ERA_D_T_FMT), +#endif +#ifdef ERA_T_FMT LANGINFO(ERA_T_FMT), +#endif +#ifdef ALT_DIGITS LANGINFO(ALT_DIGITS), +#endif +#ifdef YESEXPR LANGINFO(YESEXPR), +#endif +#ifdef NOEXPR LANGINFO(NOEXPR), #endif #ifdef _DATE_FMT |