]> granicus.if.org Git - python/commitdiff
Patch #546194: Check constants individually. Fixes 534143 on OpenBSD.
authorMartin v. Löwis <martin@v.loewis.de>
Fri, 19 Apr 2002 21:04:41 +0000 (21:04 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Fri, 19 Apr 2002 21:04:41 +0000 (21:04 +0000)
Will backport to 2.2.

Modules/_localemodule.c

index 58d349bae73bfbbad72f28eb8c83d6a48b3a99f7..e1f95a1a7d1f9aa449207a6138d268f5f7f1e07e 100644 (file)
@@ -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