diff options
| author | Tom Lane | 2018-02-27 21:46:52 +0000 |
|---|---|---|
| committer | Tom Lane | 2018-02-27 21:46:52 +0000 |
| commit | f171cbe0d90ef91ed8ae69888cece03d1f9e5c8d (patch) | |
| tree | 588f055d1fee9975e5e149ab6689a5a99073f328 /src/tools | |
| parent | 85be69154a1edc9abd9e1557ad7b2f09c0ad88bc (diff) | |
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
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/msvc/Solution.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index 4714898d70b..5b61c07928d 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -393,12 +393,13 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY || confess "Could not open ecpg_config.h"; print O <<EOF; #if (_MSC_VER > 1200) +#define HAVE_LONG_LONG_INT 1 #define HAVE_LONG_LONG_INT_64 1 +#endif #define ENABLE_THREAD_SAFETY 1 EOF print O "#define USE_INTEGER_DATETIMES 1\n" if ($self->{options}->{integer_datetimes}); - print O "#endif\n"; close(O); } |
