Fw: [PATCH 1/2] strftime.c(__strftime): add %i, %q, %v, tests; tweak %Z docs

C Howland cc1964t@gmail.com
Mon Sep 19 15:51:18 GMT 2022


>
> ------------------------------
> *From:* Newlib <newlib-bounces+craig.howland=caci.com@sourceware.org> on
> behalf of Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
> *Sent:* Saturday, September 17, 2022 1:00 AM
> *To:* Newlib <newlib@Sourceware.org>
> *Subject:* [PATCH 1/2] strftime.c(__strftime): add %i, %q, %v, tests;
> tweak %Z docs
>
>
>
> newlib/libc/time/strftime.c(__strftime):
> %i year in century [00..99] Synonym for "%y". Non-POSIX extension.
> [tm_year]
> %q GNU quarter of the year (from `<<1>>' to `<<4>>') [tm_mon]
> %v OSX/Ruby VMS/Oracle date "%d-%b-%Y". Non-POSIX extension. [tm_mday,
> tm_mon, tm_year]
> add %i %q %v tests
> %Z clarify current time zone *abbreviation* not "name" [tm_isdst]
> ---
>  newlib/libc/time/strftime.c | 67 +++++++++++++++++++++++++++++++++++--
>  1 file changed, 64 insertions(+), 3 deletions(-)
>
>
While the additions themselves nominally look good, all being extensions
they ought to be gated by the appropriate ifdefs, and the manual would best
mention what gates are needed to get them.  %q would be __GNU_VISIBLE as
the gate and _GNU_SOURCE for the user/manual, and I'd guess probably
__MISC_VISIBLE gate for the others (user action as noted in sys/features.h).
Craig


More information about the Newlib mailing list