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: Introduction and 64 bit time_t


Hi again,

first of all, thanks to Sebastion for his example of how to add
something like that to newlib. It really helped me getting my feet wet.

In the reply to this mail is the patch I came up with in order to
define time_t to an appropriate type. I'm happy for any feedback on it.

However, during the tests I did, I recognized that though sizeof(time_t)
has been 8 now, our software did a wrap-around in January 2038. I was
able to track it down to gmtime_r where the time_t lcltime gets casted
to long in order to fit into days and rem.

Having days and rem be a time_t and removing the casts fixes the wrap-
around for me, but I highly suspect that this is not a *clean* way to do
it. What are your sugestions on this? Which type should days and rem
have?

Regards
Philipp



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