summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorAndrew Dunstan2016-04-29 11:59:47 +0000
committerAndrew Dunstan2018-09-11 19:44:42 +0000
commit9ca32a6ebc12d91a4df314e47bb1faf933e5bbb4 (patch)
tree09b0a16744688abe52257336e5c773ca348c783a /src/backend
parent35ea98f79af299fd946d160eabf0a79e033d8115 (diff)
Support building with Visual Studio 2015
Adjust the way we detect the locale. As a result the minumum Windows version supported by VS2015 and later is Windows Vista. Add some tweaks to remove new compiler warnings. Remove documentation references to the now obsolete msysGit. Michael Paquier, somewhat edited by me, reviewed by Christian Ullrich. Rather belated backpatch to 9.4 and 9.3
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/port/win32/crashdump.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/backend/port/win32/crashdump.c b/src/backend/port/win32/crashdump.c
index e03a1a381ea..344c4883726 100644
--- a/src/backend/port/win32/crashdump.c
+++ b/src/backend/port/win32/crashdump.c
@@ -41,7 +41,21 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <string.h>
+/*
+ * Some versions of the MS SDK contain "typedef enum { ... } ;" which the MS
+ * compiler quite sanely complains about. Well done, Microsoft.
+ * This pragma disables the warning just while we include the header.
+ * The pragma is known to work with all (as at the time of writing) supported
+ * versions of MSVC.
+ */
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable : 4091)
+#endif
#include <dbghelp.h>
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
/*
* Much of the following code is based on CodeProject and MSDN examples,