[tz] [PATCH] Support building zic.exe and zdump.exe natively on Windows with Visual Studio nmake.

Paul Eggert eggert at cs.ucla.edu
Thu Feb 15 08:09:50 UTC 2018


Manuela Friedrich wrote:

> localtime.c(1540) : error C2084: function 'tm *localtime(const time_t *)' already has a body

I guess the Microsoft compiler is within its rights, since C89 and later say 
that portable applications are not allowed to redefine 'localtime'. Proposed 
patch attached (it's the first patch; it's not what you suggested, but I hope it 
works).


> So we added code that checks if TZDIR is not empty and only then applies the the leading slash.

I'm reluctant to base this on an empty TZDIR, partly because it's confusing 
(empty file names do not work with POSIX), and partly because skipping TZDIR has 
security implications on POSIX platforms. However, I suppose we can add a macro 
to do something similar. Proposed patch attached (it's the 2nd patch).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Port-to-systems-where-localtime-etc.-are-reserved.patch
Type: text/x-patch
Size: 3654 bytes
Desc: not available
URL: <http://mm.icann.org/pipermail/tz/attachments/20180215/5c9f2ae7/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Allow-specialized-usage-without-TZDIR.patch
Type: text/x-patch
Size: 2326 bytes
Desc: not available
URL: <http://mm.icann.org/pipermail/tz/attachments/20180215/5c9f2ae7/attachment-0001.bin>


More information about the tz mailing list