July 30, 2015
8:49 p.m.
Kees Dekker wrote:
Localtime.c will have a gmtime_r() but of the system does not recognize gmtime_r(), there is also no prototype.
We can fix that in localtime.c by defining gmtime_r before using it, as in the attached proposed patch.
So both localtime.c and zdump.c will suffer from it.
I don't see why zdump.c suffers from any problem here. When zdump.c defines its own gmtime_r, it does so before using it.
And I would expect only one implementation (in localtime.c), not another one in zdump.c.
As I mentioned, zdump.c is intended to be useful even if localtime.c is not linked. That is why it needs its own implementation. See the comment about USE_LTZ.