summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2013-03-14 17:40:14 +0000
committerJosé Fonseca <jfonseca@vmware.com>2013-03-14 19:01:10 +0000
commita35a19a6ea7248d98282f87244138299fa130c85 (patch)
treeb8db337205fc6a7bdc8b58b02387523f6ee10f26 /include
parent6a3d77e13dbae17000e35ce16023532200e68d09 (diff)
scons: Define _ALLOW_KEYWORD_MACROS on MSVC builds.
scons/llvm.py defines inline globally to workaround issues with LLVM C binding headers, so the only way to is to avoid aggravating xkeycheck.h errors is to set _ALLOW_KEYWORD_MACROS. This fixes MSVC 2012 build with LLVM. Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'include')
-rw-r--r--include/c99_compat.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/c99_compat.h b/include/c99_compat.h
index 3a9f502a7ea..429c6014845 100644
--- a/include/c99_compat.h
+++ b/include/c99_compat.h
@@ -37,12 +37,10 @@
* Visual Studio 2012 will complain if we define the `inline` keyword, but
* actually it only supports the keyword on C++.
*
- * We could skip this check by defining _ALLOW_KEYWORD_MACROS, but there is
- * probably value in checking this for other keywords. So simply include
- * the checking before we define it below.
+ * To avoid this the _ALLOW_KEYWORD_MACROS must be set.
*/
-# if _MSC_VER >= 1700
-# include <xkeycheck.h>
+# if (_MSC_VER >= 1700) && !defined(_ALLOW_KEYWORD_MACROS)
+# define _ALLOW_KEYWORD_MACROS
# endif
/*