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

Matt Johnson mj1856 at hotmail.com
Fri Feb 16 21:41:47 UTC 2018


Thanks for this.  May I request a brief summary of how to compile in Visual Studio, starting from sources to final output?  I'm not sure which flags to set, where to set them, how to work with the makefile vs. Visual Studio's project files, etc.

Thanks,
Matt
________________________________
From: tz <tz-bounces at iana.org> on behalf of Manuela Friedrich <Manuela.Friedrich at actian.com>
Sent: Friday, February 16, 2018 2:20 AM
To: Paul Eggert; Time Zone Mailing List
Subject: Re: [tz] [PATCH] Support building zic.exe and zdump.exe natively on Windows with Visual Studio nmake.

Thanks, Paul!

Your patches work.
We can no build zic.exe and zdump.exe from the latest git revision.

Regards
Manuela Friedrich

-----Original Message-----
From: Paul Eggert [mailto:eggert at cs.ucla.edu]
Sent: Donnerstag, 15. Februar 2018 09:10
To: Manuela Friedrich <Manuela.Friedrich at actian.com>; Time Zone Mailing List <tz at iana.org>
Subject: Re: [tz] [PATCH] Support building zic.exe and zdump.exe natively on Windows with Visual Studio nmake.

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 --------------
An HTML attachment was scrubbed...
URL: <http://mm.icann.org/pipermail/tz/attachments/20180216/0e9f4b5e/attachment.htm>


More information about the tz mailing list