[tz] question regarding 'timezone' variable

Kees Dekker Kees.Dekker at infor.com
Tue Sep 1 14:47:42 UTC 2015


I rolled back by VS 2015 changes, so it is not very easy to get the compile error. I need to reapply/redo the VS2015 changes to reproduce the problem. If I have time tomorrow to do so, I will try...

It was solved by replacing timezone by _timezone. I figured out this difference by comparing the Visual Studio 2013 and 2015 header files where timezone was defined.

I was actually compiling my own localtime.c, which is a copy of a much older (I guess February 2013) variant of tzcode's locatime.c. Because own customizations were (unfortunately) made in the past, it is not very easy to test the latest github variant.

I consider to turn off USG_COMPAT define, which is IMO pretty weird to have enabled on Windows. That will also solve my issue.


-----Original Message-----
From: Paul Eggert [mailto:eggert at cs.ucla.edu] 
Sent: Tuesday, September 01, 2015 08:29
To: Kees Dekker; tz at iana.org
Subject: Re: [tz] question regarding 'timezone' variable

Kees Dekker wrote:
> Visual Studio 2015 has renamed timezone to _timezone (note the leading underscore). As a result, both strftime.c and localtime.c do not compile anymore.

Why doesn't localtime.c compile?  The variables have diffent names and so should 
not interfere with each other.  What's the error message?  Do you still get an 
error with the patch I proposed and have installed in the experimental version 
on Github?

More information about the tz mailing list