strftime followup

Jeff Johnston jjohnstn@redhat.com
Fri Feb 25 22:32:00 GMT 2005


Patch applied.

-- Jeff J.

Eric Blake wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Oops, I had an incorrect statement in the docs (not all years have 53
> weeks), and missed a case of negative years (the expansion of %x) the
> first time around.  Meanwhile, since __tzrule.offset[0] is supposed to
> match _timezone, I made sure the time functions don't overflow
> architectures with a 16-bit int when a 32-bit long is required.
> 
> 2005-02-24  Eric Blake  <ebb9@byu.net>
> 
> 	* libc/include/time.h (__tzrule_struct): Make offset long, since
> 	a 16-bit int overflows on a 12-hour offset.
> 	* libc/sys/linux/include/time.h: Ditto.
> 	* libc/time/mktime.c (mktime): Use new type of __tzrule.offset.
> 	* libc/time/mktm_r.c: Ditto.
> 	* libc/time/gettzinfo.c: Ditto.
> 	* libc/time/strftime.c (strftime): Fix '%x' to deal with negative
> 	years.  Fix '%z' to use long, not int.
> 
> - --
> Life is short - so eat dessert first!
> 
> Eric Blake             ebb9@byu.net
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.0 (Cygwin)
> Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
> 
> iD8DBQFCHzQk84KuGfSFAYARAk6LAJsFqrw7io5mJFDoBOIMaFhAqwWK2ACfYTXY
> in7uj3hkEsVlV0F0Z9uulIY=
> =v7+A
> -----END PGP SIGNATURE-----



More information about the Newlib mailing list