From 4e12a62e884441dbce62d3bd38108022e93e25c6 Mon Sep 17 00:00:00 2001 From: Rafal Luzynski Date: Tue, 21 Mar 2017 09:27:08 +0100 Subject: cal: Use ALTMON_* correctly cal: use ALTMON_* and _NL_ABALTMON_* constants to display months in a standalone form correctly. These constants have just been newly added to glibc. ALTMON_x has been used in BSD family since 1990s and has been accepted as the future POSIX extension. _NL_ABALTMON_* is exclusively a GNU extension but it is expected to be added to POSIX in future. More info: https://sourceware.org/bugzilla/show_bug.cgi?id=10871 --- include/nls.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'include') diff --git a/include/nls.h b/include/nls.h index 50f4f29f7..fd62c07d4 100644 --- a/include/nls.h +++ b/include/nls.h @@ -122,4 +122,34 @@ enum { #endif /* !HAVE_LANGINFO_H */ +#ifndef HAVE_LANGINFO_ALTMON +# define ALTMON_1 MON_1 +# define ALTMON_2 MON_2 +# define ALTMON_3 MON_3 +# define ALTMON_4 MON_4 +# define ALTMON_5 MON_5 +# define ALTMON_6 MON_6 +# define ALTMON_7 MON_7 +# define ALTMON_8 MON_8 +# define ALTMON_9 MON_9 +# define ALTMON_10 MON_10 +# define ALTMON_11 MON_11 +# define ALTMON_12 MON_12 +#endif /* !HAVE_LANGINFO_ALTMON */ + +#ifndef HAVE_LANGINFO_NL_ABALTMON +# define _NL_ABALTMON_1 ABMON_1 +# define _NL_ABALTMON_2 ABMON_2 +# define _NL_ABALTMON_3 ABMON_3 +# define _NL_ABALTMON_4 ABMON_4 +# define _NL_ABALTMON_5 ABMON_5 +# define _NL_ABALTMON_6 ABMON_6 +# define _NL_ABALTMON_7 ABMON_7 +# define _NL_ABALTMON_8 ABMON_8 +# define _NL_ABALTMON_9 ABMON_9 +# define _NL_ABALTMON_10 ABMON_10 +# define _NL_ABALTMON_11 ABMON_11 +# define _NL_ABALTMON_12 ABMON_12 +#endif /* !HAVE_LANGINFO_NL_ABALTMON */ + #endif /* UTIL_LINUX_NLS_H */ -- cgit v1.2.3-55-g7522