From: Jason Rumney <jasonr@gnu.org>
Subject: Re: Bug in format-time-string in emacs 21.1?
Date: 13 Mar 2002 22:13:33 +0000 [thread overview]
Message-ID: <m3wuwgp14i.fsf@nyaumo.btinternet.com> (raw)
In-Reply-To: <200203131059.g2DAx1I05506@wijiji.santafe.edu>
Richard Stallman <rms@gnu.org> 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
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel
next prev parent reply other threads:[~2002-03-13 22:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.SUN.3.91.1020312075746.24908F-100000@is>
[not found] ` <m3n0xep8u8.fsf@Janik.cz>
2002-03-12 21:35 ` Bug in format-time-string in emacs 21.1? Jason Rumney
2002-03-12 22:21 ` Paul Eggert
2002-03-12 22:56 ` Jason Rumney
2002-03-12 23:37 ` Paul Eggert
2002-03-13 19:49 ` Jason Rumney
2002-03-14 0:37 ` Paul Eggert
2002-03-13 10:59 ` Richard Stallman
2002-03-13 22:13 ` Jason Rumney [this message]
2002-03-14 0:13 ` Paul Eggert
2002-03-14 22:28 ` Jason Rumney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3wuwgp14i.fsf@nyaumo.btinternet.com \
--to=jasonr@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).