Last week I did:
> 2025-02-21  Bruno Haible  <br...@clisp.org>
> 
>       langinfo-h, nl_langinfo: Support abbreviated alternative month names.
>       * lib/langinfo.in.h (ABALTMON_1...ABALTMON_12): New macros.
>       * m4/langinfo_h.m4 (gl_LANGINFO_H): Define HAVE_LANGINFO_ABALTMON.
>       * modules/langinfo-h (Makefile.am): Substitute HAVE_LANGINFO_ABALTMON.
>       * tests/test-langinfo-h.c (items): Add ABALTMON_1 to ABALTMON_12.
>       * lib/nl_langinfo.c (rpl_nl_langinfo): Treat ABALTMON_i like ABMON_i.
>       * tests/test-nl_langinfo.c (main): Test ABALTMON_*.

Oops, there is a unit test failure on CentOS 7, Alpine Linux, NetBSD 10,
Solaris 11. This patch fixes it.


2025-02-24  Bruno Haible  <br...@clisp.org>

        nl_langinfo: Fix support of abbreviated alternative month names.
        * lib/nl_langinfo.c (rpl_nl_langinfo): Treat ABALTMON_i like ABMON_i.

diff --git a/lib/nl_langinfo.c b/lib/nl_langinfo.c
index f2a177cbd8..b87066bbfd 100644
--- a/lib/nl_langinfo.c
+++ b/lib/nl_langinfo.c
@@ -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




Reply via email to