Another improvement of gmtime_r()
Tue Jun 23 19:49:00 GMT 2015
On Jun 12 19:06, Freddie Chopin wrote:
> On 27.05.2015 12:32, Corinna Vinschen wrote:
> >Thanks. Did you test that this still works on 16 bit machines? A comment
> >in the aforementioned document points out that some extra care may be
> >required. E.g., EPOCH_ADJUSTMENT_DAYS should probably be explicitely
> >defined as long const (like DAYS_PER_ERA, etc).
> I don't have access to any 16-bit target, so I did a simpler test - I just
> redefined "int", "unsigned" and "long" to int16_t, uint16_t and uint32_t and
> tested that on 32-bit ARM target. The original patch indeed failed such
> test, but by defining "eraday" to be "unsigned long" instead of "unsigned"
> (and adding L suffix to EPOCH_ADJUSTMENT_DAYS as you suggested) allows such
> simple test to pass.
> I attach improved patch and Changelog entry.
Thanks. Patch applied with a minor tweak to the comment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: not available
More information about the Newlib