This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [RFA] strftime: Add POSIX flags, width, and handling for E and O modifier
On Feb 25 12:47, Jeff Johnston wrote:
> On 25/02/10 05:17 AM, Corinna Vinschen wrote:
> >So the question is this. Does it make sense to add another configure
> >option --enable-newlib-strftime-c99-formats? If yes, ok, if not, I
> >would just add another option to sys/config.h and not call it _WANT_foo
> >but just, say , _C99_TIME_FORMATS.
> >
>
> There is no problem with adding a WANT flag and not adding a
> configure option. Assume platforms will want it on or off by
> default and we can deal with future requests as they come. Most
> platforms will not care as they aren't using the new feature
> currently. Those that are standard-conscious will turn it on
> regardless.
>
> >I'm not so sure anymore about using the __POSIX_2008_STRFTIME__ flag for
> >the padding and width modifiers at all, though.
> >The code difference between enabling and disabling them isn't that much.
> >Without optimization, and without debug symbols, the size of the i386
> >object file grows by 5K in case
> >of the E and O modifier handling. Disabling and enabling padding and
> >width only changes the size by less than 500 bytes.
> >
> >If you put that into relation to a file size of 9K for the strftime
> >function without E/O handling and 15K with, it seems to make not a lot
> >of sense to conditionalize that part of the code. The strftime function
> >is already in it's basic form not really feasible for very small
> >targets. I would opt for handling padding and width unconditionally.
> >
>
> Ok. I suggest for now, add a comment around the code so if we want
> to add a flag later, it will be easy. Something simple like: /*
> POSIX 2008 feature */
Ok, I changed strftime accordingly.
Thanks,
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat
- References:
- [RFA] strftime: Add POSIX flags, width, and handling for E and O modifier
- Re: [RFA] strftime: Add POSIX flags, width, and handling for E and O modifier
- RE: [RFA] strftime: Add POSIX flags, width, and handling for E and O modifier
- From: Howland Craig D (Craig)
- Re: [RFA] strftime: Add POSIX flags, width, and handling for E and O modifier
- Re: [RFA] strftime: Add POSIX flags, width, and handling for E and O modifier
- Re: [RFA] strftime: Add POSIX flags, width, and handling for E and O modifier
- Re: [RFA] strftime: Add POSIX flags, width, and handling for E and O modifier