[RFA] strftime: Add POSIX flags, width, and handling for E and O modifier
Howland Craig D (Craig)
Wed Feb 24 20:00:00 GMT 2010
The E and O modifiers are C99, also (not just POSIX extensions).
So if that were to be gated, it would want to be something like
The '0' and '+' padding flags are POSIX CX extensions, and I think
want _POSIX_C_SOURCE as the gate. (Which is allowed to be not defined
if _XOPEN_SOURCE is, which we'd want to cover in a header somewhere,
as the code may define _POSIX_C_SOURCE if is is not defined yet
_XOPEN_SOURCE has been). So
for the '0' and '+' flags. Although it might be better to say something
#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200809L
(Or another appropriate number. See the
From: email@example.com [mailto:firstname.lastname@example.org]
On Behalf Of Jeff Johnston
Sent: Wednesday, February 24, 2010 2:18 PM
Subject: Re: [RFA] strftime: Add POSIX flags, width, and handling for E
and O modifier
On 22/02/10 08:59 AM, Corinna Vinschen wrote:
> below is a rather big patch to libc/time/strftime.c. It reworks
> strftime and wcsftime to accomplish the following:
> - Add the POSIX-1.2008 '0' and '+' padding flags
> Ok to apply?
Yes. If you can cordone off major functional sections using a flag to
save space for cross-platforms that are ok with current functionality:
e.g. #ifdef __POSIX_2008_STRFTIME__, that would be helpful.
-- Jeff J.
More information about the Newlib