summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2017-10-11 19:06:29 -0700
committerAndres Freund <andres@anarazel.de>2017-10-11 19:06:29 -0700
commit36b4b91ba07843406d5a30106facb59d8275c6de (patch)
treed44a0f90cd0e3c0dd0660d7c99d2dbfb2e83f4c9
parent060b069984a69ff0255ce318f10681c553613bef (diff)
Temporary attempt at a workaround for further MSVC restrict build failures.
It appears some versions of msvc use __declspec(restrict) in stdlib.h and subsidiary headers. Including those after defining 'restrict' to '__restrict' doesn't work. Try to get the buildfarm green to see whether there's further problems, by including stdlib.h just before said define.
-rw-r--r--src/include/pg_config.h.win325
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32
index 3be1c235aaa..81604de7f92 100644
--- a/src/include/pg_config.h.win32
+++ b/src/include/pg_config.h.win32
@@ -687,6 +687,11 @@
/* Visual Studio 2008 and upwards */
#if (_MSC_VER >= 1500)
/* works for C and C++ in msvc */
+/*
+ * Temporary attempt at a workaround for stdlib.h's use of
+ * declspec(restrict), conflicting with below define.
+ */
+#include <stdlib.h>
#define restrict __restrict
#else
#define restrict