diff options
author | Jim Meyering <jim@meyering.net> | 2003-05-29 12:09:06 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-05-29 12:09:06 +0000 |
commit | efc545bd54e20f47a74f05d8ccdc5e311036d8f0 (patch) | |
tree | 839ebd22bc7a7cebd43a0bc9004d9e7555bf20fd | |
parent | 95fa743ec4404983d4b422ac70ac69aa09cbf041 (diff) | |
download | coreutils-efc545bd54e20f47a74f05d8ccdc5e311036d8f0.tar.xz |
Make the %r format directive honor any locale setting.
(my_strftime) [!defined _NL_CURRENT && HAVE_STRFTIME]:
Use underlying_strftime for %r.
-rw-r--r-- | lib/strftime.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/strftime.c b/lib/strftime.c index 52e84e322..fabb26530 100644 --- a/lib/strftime.c +++ b/lib/strftime.c @@ -1171,13 +1171,17 @@ my_strftime (s, maxsize, format, tp extra_args LOCALE_PARAM) goto subformat; case L_('r'): -#ifdef _NL_CURRENT +#if !defined _NL_CURRENT && HAVE_STRFTIME + goto underlying_strftime; +#else +# ifdef _NL_CURRENT if (*(subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(T_FMT_AMPM))) == L_('\0')) -#endif +# endif subfmt = L_("%I:%M:%S %p"); goto subformat; +#endif case L_('S'): if (modifier == L_('E')) |