diff options
author | Bruno Haible <bruno@clisp.org> | 2018-01-24 10:02:17 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2018-01-24 10:02:17 +0100 |
commit | b5d317541ee1c337ce954099289eeac10d161180 (patch) | |
tree | ee51b8f7f8c0e155df3946cb5585f0e0fe58fef5 /lib/langinfo.in.h | |
parent | 4a236f16ce0ef97094ff2f6538d4dba90e72a523 (diff) | |
download | gnulib-b5d317541ee1c337ce954099289eeac10d161180.tar.gz |
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.
Diffstat (limited to 'lib/langinfo.in.h')
-rw-r--r-- | lib/langinfo.in.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/langinfo.in.h b/lib/langinfo.in.h index e51bb57b31..31ac575412 100644 --- a/lib/langinfo.in.h +++ b/lib/langinfo.in.h @@ -86,6 +86,18 @@ typedef int nl_item; # 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 @@ typedef int nl_item; # 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 |