Oct. 23, 2017
7:33 p.m.
Patrice Scattolin <patrice.scattolin@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