This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Another improvement of gmtime_r()


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.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

Attachment: pgpK5rpbol7mo.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]