From 6e396aa6460ca9ad8909d3b91f18c06b777240e3 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Wed, 13 Mar 2002 23:01:45 +0000 Subject: [PATCH] (my_strftime) [STRFTIME_NO_POSIX2]: Handle %h, %EX and %OX when underlying strftime does not. --- src/strftime.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/strftime.c b/src/strftime.c index 789e7ae8e91..e7a87a9bf8c 100644 --- a/src/strftime.c +++ b/src/strftime.c @@ -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; -- 2.39.2