summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJason Rumney <jasonr@gnu.org>2002-03-13 23:01:45 +0000
committerJason Rumney <jasonr@gnu.org>2002-03-13 23:01:45 +0000
commit6e396aa6460ca9ad8909d3b91f18c06b777240e3 (patch)
tree083ebb77d956d93970ec48033c784037d9368485 /src
parentc668cdd02bf9c5d855b14acee0bad03b10f067bc (diff)
downloademacs-6e396aa6460ca9ad8909d3b91f18c06b777240e3.tar.gz
(my_strftime) [STRFTIME_NO_POSIX2]: Handle %h, %EX
and %OX when underlying strftime does not.
Diffstat (limited to 'src')
-rw-r--r--src/strftime.c7
1 files changed, 7 insertions, 0 deletions
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;