[tz] Anyone else having snprintf issues with 2017c?

Tom Lane tgl at sss.pgh.pa.us
Mon Oct 23 19:33:17 UTC 2017


Patrice Scattolin <patrice.scattolin at oracle.com> writes:
> Presumably it's the value of __STDC_VERSION__ inside the declaration of 
> HAVE_SNPRINTF that's causing the problem in one environment but not the 
> other. See at line 25:

> #ifndef HAVE_SNPRINTF
> # define HAVE_SNPRINTF (199901 <= __STDC_VERSION__)
> #endif

This coding will fail on a C90 compiler that's on a platform that supplies
snprintf, which is a combination I don't find real surprising --- probably
"gcc -ansi" would behave that way on many machines.

Apparently the expectation is that people using such platforms will
manually fix things by defining HAVE_SNPRINTF=1.  I'm not sure it's
possible to do better without autoconf.

			regards, tom lane


More information about the tz mailing list