[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 1 17:37:45 UTC 2018


On 02/01/2018 08:37 AM, Manuela Friedrich wrote:
> I managed to write a minimal tools.ini file for Windows that doesn't require changes of the Makefile so that compiling on POSIX systems will work as before.

Thanks, that sounds like a good way to go.

> It contains Windows versions of the version and version.h rules as these use shell commands in the base Makefile which will not work on Windows.  Also, tools.ini contains any windows specific flags to the compiler, variables, suffixes and windows specific compilation rules.
>
> As explained earlier our customers will download the latest release from your ftp server and will need the tools.ini file and the getopt.c file as part of your latest release package.

Normally, downstream wrappers like this are maintained in downstream 
packages, as the tzdb project itself doesn't have the maintenance oomph 
to support all the downstream platforms ourselves. So I suggest that you 
give your customers the tools.ini and getopt.c files as part of your 
package; they can then use those files along with the downloaded data 
and code from tzdb.

> Stat on Windows is documented on msdn:https://msdn.microsoft.com/en-us/library/14h5k7ff(v=vs.100).aspx
> Having /. appended to a filename is not mentioned, potentially it's not expected.
> In the debugger I see stat returning 0 for an existing file with /. appended but -1 for a non-existing file with /. appended.

It's odd that "FOO/." acts like "FOO" when FOO is not a directory. Do 
the following names also act like "FOO"? That is, on MS-Windows can one 
append any number of ".", "/" and "\" to an ordinary filename without 
affecting its interpretation, so long as every "." is preceded by a "/" 
or "\"?

"FOO//"
"FOO/./"
"FOO/./."
"FOO\"
"FOO\."
"FOO\.\"


More information about the tz mailing list