Fix up ecpg's configuration so it handles "long long int" in MSVC builds.
authorTom Lane
Tue, 27 Feb 2018 21:46:52 +0000 (16:46 -0500)
committerTom Lane
Tue, 27 Feb 2018 21:46:52 +0000 (16:46 -0500)
commitfda3e65786763bd43abc576a23035a4cd24ed138
tree3e17403c01e90c08b435234b7726c133ac41b288
parentb9dac4a6eb41479d991249affe537e9861698271
Fix up ecpg's configuration so it handles "long long int" in MSVC builds.

Although configure-based builds correctly define HAVE_LONG_LONG_INT when
appropriate (in both pg_config.h and ecpg_config.h), builds using the MSVC
scripts failed to do so.  This currently has no impact on the backend,
since it uses that symbol nowhere; but it does prevent ecpg from
supporting "long long int".  Fix that.

Also, adjust Solution.pm so that in the constructed ecpg_config.h file,
the "#if (_MSC_VER > 1200)" covers only the LONG_LONG_INT-related
#defines, not the whole file.  AFAICS this was a thinko on somebody's
part: ENABLE_THREAD_SAFETY should always be defined in Windows builds,
and in branches using USE_INTEGER_DATETIMES, the setting of that shouldn't
depend on the compiler version either.  If I'm wrong, I imagine the
buildfarm will say so.

Per bug #15080 from Jonathan Allen; issue diagnosed by Michael Meskes
and Andrew Gierth.  Back-patch to all supported branches.

Discussion: https://postgr.es/m/151935568942.1461.14623890240535309745@wrigleys.postgresql.org
src/include/pg_config.h.win32
src/tools/msvc/Solution.pm