Re: Fw: [PATCH 1/2] strftime.c(__strftime): add %i, %q, %v, tests; tweak %Z docs
C Howland <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <CANk6obSE2DshJD2ZDwxQodFhjmdqKQG9Q0MaCiSEC9ho4Nt31A@mail.gmail.com> |
> > ------------------------------ > *From:* Newlib <[email protected]> on > behalf of Brian Inglis <[email protected]> > *Sent:* Saturday, September 17, 2022 1:00 AM > *To:* Newlib <[email protected]> > *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