[tz] source code changes in tzcode2013d: int_:fast32_t
christos at zoulas.com
Sun Jul 21 14:25:49 UTC 2013
On Jul 21, 1:20pm, alois at astro.ch (Alois Treindl) wrote:
-- Subject: Re: [tz] source code changes in tzcode2013d: int_:fast32_t
| I noticed that a lot of source code changes were done in tzcode, for
| example many variables which were of type long have been changed
| to int_fast32_t.
| On my system, a x86_64 Linux, we get: typedef long int_fast32_t.
| So as expected, it comes out the same. long is 64 bit.
| But I wonder about the rationale behind the naming of this type: is it
| supposed to hold only 32-bit values? If it is supposed not to suffer
| from 32-bit overflow problems, i.e. meant to be wider than 32 bits, why
| is it named the way it is named?
| A general question: there is very little documentation for the source
| code in general. Would it not be appropriate for the maintainers of the
| code to include more internal documentation?
The biggest problem with this change is that it is ABI changing in the
following 3 functions:
struct tm *
offtime(const time_t * clock, long int offset);
struct tm *
offtime_r(const time_t * clock, long int offset, struct tm *ret);
timeoff(struct tm * tm, long int offset);
In order not to change the ABI, I did not change them for NetBSD.
The rest of the changes are internal, so they don't matter.
And a cosmetic one, all the gcc attributes (not just some) should
be __foo__ instead of foo, and the macros should be named consistenty.
Finally my shameless plug, the NetBSD sources also contain the following
- multi-timezone support, thread safe code (_rz functions)
- code to behave like glibc in the DST gap (not fail if enabled)
- consistent errno setting on failure
- man pages in mdoc not man format
- modernization (s/sprintf/snprintf/, s/register//)
More information about the tz