pgsql: Fix up ecpg's configuration so it handles "long long int" in MSV

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix up ecpg's configuration so it handles "long long int" in MSV
Date: 2018-02-27 21:47:14
Message-ID: E1eqn5e-00082Q-3V@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
REL9_3_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/87b7e1e887727869053fd1e58cfa5a1284491e81

Modified Files
--------------
src/include/pg_config.h.win32 | 5 +++++
src/tools/msvc/Solution.pm | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Geoghegan 2018-02-27 22:33:08 Re: pgsql: Avoid valgrind complaint about write() of uninitalized bytes.
Previous Message Tom Lane 2018-02-27 20:56:57 pgsql: Use the correct tuplestore read pointer in a NamedTuplestoreScan