diff options
author | Rafal Luzynski | 2017-03-21 09:27:08 +0100 |
---|---|---|
committer | Rafal Luzynski | 2018-01-22 11:50:50 +0100 |
commit | 4e12a62e884441dbce62d3bd38108022e93e25c6 (patch) | |
tree | f9d717fd7d8885c5a8cd783f823c6359c9f2cbab /include | |
parent | cal: fix julian calendars for large years (diff) | |
download | kernel-qcow2-util-linux-4e12a62e884441dbce62d3bd38108022e93e25c6.tar.gz kernel-qcow2-util-linux-4e12a62e884441dbce62d3bd38108022e93e25c6.tar.xz kernel-qcow2-util-linux-4e12a62e884441dbce62d3bd38108022e93e25c6.zip |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/nls.h | 30 |
1 files changed, 30 insertions, 0 deletions
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 */ |