[tz] Windows build failures

Paul Eggert eggert at cs.ucla.edu
Tue Dec 20 01:31:47 UTC 2022


On 12/19/22 01:23, Manuela Friedrich wrote:
> I noticed new Windows build failures with the latest tz code from git.
> Hopefully you can shed some light on these.
>
> Error 1
>
> d:\iana\tmp\private.h(704): error C2373: 'restrict': redefinition; different type modifiers
> d:\iana\tmp\private.h(704): note: see declaration of 'restrict'

This line should be compiled only if you're building with 
-DHAVE_DECL_ASCTIME_R=0, which you should be using only if <time.h> does 
not declare asctime_r. But evidently your<time.h> does declare asctime_r 
or otherwise you wouldn't be getting that diagnostic. So I suggest 
dropping -DHAVE_DECL_ASCTIME_R=0 from your build flags. Or, if my 
diagnosis is incorrect, let's see the output of 'cc -E' to see what's 
going wrong here.

> d:\iana\tmp\private.h(780): error C2373: 'restrict': redefinition; different type modifiers
> d:\iana\tmp\private.h(780): note: see declaration of 'restrict'

This one is more of a mystery, as this is localtime_rz. Does MS-Windows 
define its own localtime_rz? If not, what declaration of localtime_rz 
collides with this one? Again, you may need to run 'cc -E' to see what's 
going on, by looking at the preprocessor output.




More information about the tz mailing list