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 <charmainel@vmware.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
This commit is contained in:
Brian Paul
2018-04-13 09:56:33 -06:00
parent 5dc7233f44
commit 1098c18af3

View File

@@ -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 {