]> Savannah Git Hosting - gnulib.git/commitdiff
nl_langinfo: Fix support of abbreviated alternative month names.
authorBruno Haible <bruno@clisp.org>
Mon, 24 Feb 2025 07:34:15 +0000 (08:34 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 24 Feb 2025 07:34:15 +0000 (08:34 +0100)
* lib/nl_langinfo.c (rpl_nl_langinfo): Treat ABALTMON_i like ABMON_i.

ChangeLog
lib/nl_langinfo.c

index 4453b26db44d68182fd6386159606c1c8976230c..e3029719498507ed5972668fa67109156ec08a41 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2025-02-24  Bruno Haible  <bruno@clisp.org>
+
+       nl_langinfo: Fix support of abbreviated alternative month names.
+       * lib/nl_langinfo.c (rpl_nl_langinfo): Treat ABALTMON_i like ABMON_i.
+
 2025-02-24  Bruno Haible  <bruno@clisp.org>
 
        strerror_l tests: Fix link error.
index f2a177cbd854a882b7c7c913775394567b1deafd..b87066bbfddacf62669fb0c19b38a7df3e5a0d06 100644 (file)
@@ -317,6 +317,24 @@ rpl_nl_langinfo (nl_item item)
       item = item - ALTMON_1 + MON_1;
       break;
 # endif
+# if GNULIB_defined_ABALTMON
+    case ABALTMON_1:
+    case ABALTMON_2:
+    case ABALTMON_3:
+    case ABALTMON_4:
+    case ABALTMON_5:
+    case ABALTMON_6:
+    case ABALTMON_7:
+    case ABALTMON_8:
+    case ABALTMON_9:
+    case ABALTMON_10:
+    case ABALTMON_11:
+    case ABALTMON_12:
+      /* We don't ship the appropriate localizations with gnulib.  Therefore,
+         treat ABALTMON_i like ABMON_i.  */
+      item = item - ABALTMON_1 + ABMON_1;
+      break;
+# endif
 # if GNULIB_defined_ERA
     case ERA:
       /* The format is not standardized.  In glibc it is a sequence of strings