diff src/strftime.c @ 43890:38d2cf408e27

(my_strftime) [STRFTIME_NO_POSIX2]: Handle %h, %EX and %OX when underlying strftime does not.
author Jason Rumney <jasonr@gnu.org>
date Wed, 13 Mar 2002 23:01:45 +0000
parents e4835ecdffbc
children a1fef23ccede
line wrap: on
line diff
--- a/src/strftime.c	Wed Mar 13 18:00:48 2002 +0000
+++ b/src/strftime.c	Wed Mar 13 23:01:45 2002 +0000
@@ -834,6 +834,13 @@
             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;