]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Make the %r format directive honor any locale setting.
authorJim Meyering <jim@meyering.net>
Thu, 29 May 2003 12:09:06 +0000 (12:09 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 29 May 2003 12:09:06 +0000 (12:09 +0000)
(my_strftime) [!defined _NL_CURRENT && HAVE_STRFTIME]:
Use underlying_strftime for %r.

lib/strftime.c

index 52e84e322ac306bc35f2e36b61d16a0de7497ace..fabb2653083aa532639e0e45c9e1a155ac1d204f 100644 (file)
@@ -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'))