[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in format-time-string in emacs 21.1?
From: |
Jason Rumney |
Subject: |
Re: Bug in format-time-string in emacs 21.1? |
Date: |
13 Mar 2002 22:13:33 +0000 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50 |
Richard Stallman <address@hidden> writes:
> Alternatively, we could introduce more conditional blocks to
> strftime.c to do something sensible with the POSIX.2 extensions on
> platforms that only support POSIX.1 formats. I think most of them
> could be handled without too much effort.
>
> If someone wants to do this work, it would clearly give a better
> result than documenting flaws.
The following patch makes %h, %EX and %OX do sensible things on
Windows. Is it worth making configure detect when these fail on
other systems (ie does anyone know of other systems where these might
not work)?
--- strftime.c.~1.25.~ Mon Dec 31 18:26:41 2001
+++ strftime.c Wed Mar 13 22:01:14 2002
@@ -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;
--
Jason Rumney
Re: Bug in format-time-string in emacs 21.1?, Richard Stallman, 2002/03/13
- Re: Bug in format-time-string in emacs 21.1?,
Jason Rumney <=