summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2018-04-13 09:56:33 -0600
committerBrian Paul <[email protected]>2018-04-13 13:53:12 -0600
commit1098c18af3f432968be9c46a2be0ff7f420060d7 (patch)
tree3dbd1c2d96d42e78f4fe71055f90d40b0587129a /src/compiler
parent5dc7233f444a84f6317509e690c861a87562775e (diff)
glsl: #undef THIS macro to fix MSVC build
THIS is a macro in one of the MSVC header files. It's also a token in the GLSL lexer. This causes a compilation failure with MSVC. This issue seems to be newly exposed after the recent mtypes.h removal patches. Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Neha Bhende <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/glsl_parser_extras.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h
index 66bd1a3db6e..5b9b6cc8621 100644
--- a/src/compiler/glsl/glsl_parser_extras.h
+++ b/src/compiler/glsl/glsl_parser_extras.h
@@ -33,6 +33,11 @@
#include <stdlib.h>
#include "glsl_symbol_table.h"
+/* THIS is a macro defined somewhere deep in the Windows MSVC header files.
+ * Undefine it here to avoid collision with the lexer's THIS token.
+ */
+#undef THIS
+
struct gl_context;
struct glsl_switch_state {