[PATCH] Add wcsftime()

Howland Craig D (Craig) howland@LGSInnovations.com
Mon Mar 9 16:14:00 GMT 2009

Attached is a patch which contains changes and additions to implement
the wcsftime() function.
The approach taken was to edit strftime in such a way that it can be
compiled either to make strftime or wcsftime.  A large test program
was added to strftime.c which can test the particular version under
test.  This was run under RHEL5 with its native snprintf and swprintf
library functions to verify unchanged operation of strftime(), and the
new wcsftime().  (The work was done a few months ago when Newlib did
not have the required supporting swprintf() to use.  The test program
does not get built into the library, of course, requiring
_REGRESSION_TEST to be defined for the code to be used.)
In the process of making strftime() to be able to be double-compiled,
a few minor speed improvements came about from using snprintf
exclusively (it had been mostly used before) that allowed a couple
of recursions to be removed.
When I regenerated libc/time/Makefile.in, it seems to have deleted
several ac_ct... lines, along with a couple other changes that don't
to relate to the changes made to Makefile.am.  I'm not sure why.
Jeff/Corinna should do their own re-gen to be sure that something isn't
off--although it builds fine for me with it under Cygwin.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wcsftime.patch
Type: application/octet-stream
Size: 45830 bytes
Desc: wcsftime.patch
URL: <http://sourceware.org/pipermail/newlib/attachments/20090309/18e0c5d3/attachment.obj>

More information about the Newlib mailing list