From: Martin v. Löwis Date: Fri, 19 Apr 2002 21:06:13 +0000 (+0000) Subject: Patch #546194: Check constants individually. Fixes 534143 on OpenBSD. X-Git-Tag: v2.2.2b1~416 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9b6e538d7f18a1f144227c46041b15e7a2aeba5b;p=thirdparty%2FPython%2Fcpython.git Patch #546194: Check constants individually. Fixes 534143 on OpenBSD. --- diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c index 6073fc7325db..38f0aa391266 100644 --- a/Modules/_localemodule.c +++ b/Modules/_localemodule.c @@ -484,19 +484,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