]> git.eshelyaron.com Git - emacs.git/commitdiff
(my_strftime) [STRFTIME_NO_POSIX2]: Handle %h, %EX
authorJason Rumney <jasonr@gnu.org>
Wed, 13 Mar 2002 23:01:45 +0000 (23:01 +0000)
committerJason Rumney <jasonr@gnu.org>
Wed, 13 Mar 2002 23:01:45 +0000 (23:01 +0000)
and %OX when underlying strftime does not.

src/strftime.c

index 789e7ae8e91ef17dafa583366df2e6c07af0ef87..e7a87a9bf8cb02e662719048aa4f9bc764eadc82 100644 (file)
@@ -834,6 +834,13 @@ my_strftime (s, maxsize, format, tp ut_argument)
             size_t strftime ();
 # endif
 
+#ifdef STRFTIME_NO_POSIX2
+           /* Some system libraries do not support the POSIX.2 extensions.
+              In those cases, convert %h to %b, and strip modifiers.  */
+           modifier = 0;
+           if (format_char == 'h')
+             format_char = 'b';
+#endif
             *u++ = '%';
             if (modifier != 0)
               *u++ = modifier;