diff lib/langinfo.in.h @ 39226:c67645792a3d

langinfo, nl_langinfo: Add support for alternative month names. * m4/langinfo_h.m4 (gl_LANGINFO_H): Define HAVE_LANGINFO_ALTMON. * lib/langinfo.in.h (ALTMON_1...ALTMON_12): New macros. * lib/nl_langinfo.c (rpl_nl_langinfo): Treat ALTMON_i like MON_i. * tests/test-nl_langinfo.c (main): Test ALTMON_*. * doc/posix-headers/langinfo.texi: Document support of ALTMON_*. * doc/posix-functions/nl_langinfo.texi: Likewise.
author Bruno Haible <bruno@clisp.org>
date Wed, 24 Jan 2018 10:02:17 +0100
parents 24e347e0e326
children b06060465f09
line wrap: on
line diff
--- a/lib/langinfo.in.h	Tue Jan 23 00:42:04 2018 -0800
+++ b/lib/langinfo.in.h	Wed Jan 24 10:02:17 2018 +0100
@@ -86,6 +86,18 @@
 # define MON_10      (MON_1 + 9)
 # define MON_11      (MON_1 + 10)
 # define MON_12      (MON_1 + 11)
+# define ALTMON_1    10200
+# define ALTMON_2    (ALTMON_1 + 1)
+# define ALTMON_3    (ALTMON_1 + 2)
+# define ALTMON_4    (ALTMON_1 + 3)
+# define ALTMON_5    (ALTMON_1 + 4)
+# define ALTMON_6    (ALTMON_1 + 5)
+# define ALTMON_7    (ALTMON_1 + 6)
+# define ALTMON_8    (ALTMON_1 + 7)
+# define ALTMON_9    (ALTMON_1 + 8)
+# define ALTMON_10   (ALTMON_1 + 9)
+# define ALTMON_11   (ALTMON_1 + 10)
+# define ALTMON_12   (ALTMON_1 + 11)
 # define ABMON_1     10035
 # define ABMON_2     (ABMON_1 + 1)
 # define ABMON_3     (ABMON_1 + 2)
@@ -138,6 +150,22 @@
 #  define GNULIB_defined_T_FMT_AMPM 1
 # endif
 
+# if !@HAVE_LANGINFO_ALTMON@
+#  define ALTMON_1    10200
+#  define ALTMON_2    (ALTMON_1 + 1)
+#  define ALTMON_3    (ALTMON_1 + 2)
+#  define ALTMON_4    (ALTMON_1 + 3)
+#  define ALTMON_5    (ALTMON_1 + 4)
+#  define ALTMON_6    (ALTMON_1 + 5)
+#  define ALTMON_7    (ALTMON_1 + 6)
+#  define ALTMON_8    (ALTMON_1 + 7)
+#  define ALTMON_9    (ALTMON_1 + 8)
+#  define ALTMON_10   (ALTMON_1 + 9)
+#  define ALTMON_11   (ALTMON_1 + 10)
+#  define ALTMON_12   (ALTMON_1 + 11)
+#  define GNULIB_defined_ALTMON 1
+# endif
+
 # if !@HAVE_LANGINFO_ERA@
 #  define ERA         10047
 #  define ERA_D_FMT   10048