diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2018-02-27 16:46:52 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2018-02-27 16:46:52 -0500 |
commit | fda3e65786763bd43abc576a23035a4cd24ed138 (patch) | |
tree | 3e17403c01e90c08b435234b7726c133ac41b288 /src | |
parent | b9dac4a6eb41479d991249affe537e9861698271 (diff) | |
download | postgresql-fda3e65786763bd43abc576a23035a4cd24ed138.tar.gz postgresql-fda3e65786763bd43abc576a23035a4cd24ed138.zip |
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')
-rw-r--r-- | src/include/pg_config.h.win32 | 5 | ||||
-rw-r--r-- | src/tools/msvc/Solution.pm | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32 index 237ca810712..ad6e947d3e1 100644 --- a/src/include/pg_config.h.win32 +++ b/src/include/pg_config.h.win32 @@ -232,6 +232,11 @@ /* Define to 1 if `long int' works and is 64 bits. */ /* #undef HAVE_LONG_INT_64 */ +/* Define to 1 if the system has the type `long long int'. */ +#if (_MSC_VER > 1200) +#define HAVE_LONG_LONG_INT 1 +#endif + /* Define to 1 if `long long int' works and is 64 bits. */ #if (_MSC_VER > 1200) #define HAVE_LONG_LONG_INT_64 1 diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index 761e920576d..17f86c5ee87 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -426,10 +426,11 @@ s{PG_VERSION_STR "[^"]+"}{PG_VERSION_STR "PostgreSQL $self->{strver}$extraver, c || 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 "#endif\n"; close($o); } |