changeset 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 c5ea7e769ffd
children 2fb548d4f985
files src/strftime.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
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;