[tz] IANA compilation problem

Paul Eggert eggert at cs.ucla.edu
Tue Feb 21 23:31:32 UTC 2023

On 1/26/23 20:08, Steven Shuriff wrote:

> I am getting compilation errors with the tz code involving UINTMAX_MAX.
> This is happening on Windows and on VMS.  Both are using older compilers.
> Windows is getting:
> zic.c(1317) : error C2065: 'UINTMAX_MAX' : undeclared identifier
> zic.c(2358) : warning C4116: unnamed type definition in parentheses
> VMS is getting:
>    uint_fast64_t unfair_min = - ((UINTMAX_MAX % base__6 + 1) % base__6);
> .................................^
> %CC-E-UNDECLARED, In the initializer for unfair_min, "UINTMAX_MAX" is not declared.
> at line number 1272 in file DEVVS1$DKA0:[COMMON_INGSRC.TREASURE.IANA.iana.tmp]zic.c;33
> Failed to build zic
> Besides upgrading the compilers (not possible at this time) is there any possible solution?

Sorry, I didn't see this private email until now. Please try the 
attached patch, which I installed into the development repository. It 
fixes a portability bug present since TZDB release 2022f.

As mentioned in 
<https://mm.icann.org/pipermail/tz/2022-December/032399.html> I'm 
planning to phase out support for C89, as these old compilers are not 
much used nowadays and the cost of maintaining the ports to these 
compilers is starting to outweigh the benefit. In the next release if 
you still need support for old compilers the plan is that you'll need to 
compile with -DPORT_TO_C89 and/or -DSUPPORT_C99. This is intended to be 
a heads-up for builders on obsolete platforms.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Port-UINTMAX_MAX-to-pre-C99-compilers.patch
Type: text/x-patch
Size: 1346 bytes
Desc: not available
URL: <https://mm.icann.org/pipermail/tz/attachments/20230221/af705144/0001-Port-UINTMAX_MAX-to-pre-C99-compilers.patch>

More information about the tz mailing list