From 8b2f96d3fea9061172e028b43313c7482f0484db Mon Sep 17 00:00:00 2001 From: Daniel Koch Date: Wed, 3 Apr 2019 17:21:06 -0400 Subject: [PATCH] Check if _MSC_VER is defined before using. Fixes compilation errors on some platforms. --- SPIRV/SPVRemapper.h | 2 +- glslang/Include/Common.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SPIRV/SPVRemapper.h b/SPIRV/SPVRemapper.h index 97e3f31f..fa61bb94 100644 --- a/SPIRV/SPVRemapper.h +++ b/SPIRV/SPVRemapper.h @@ -45,7 +45,7 @@ namespace spv { // MSVC defines __cplusplus as an older value, even when it supports almost all of 11. // We handle that here by making our own symbol. -#if __cplusplus >= 201103L || _MSC_VER >= 1700 +#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1700) # define use_cpp11 1 #endif diff --git a/glslang/Include/Common.h b/glslang/Include/Common.h index 98e5a1a0..f79f2d6d 100644 --- a/glslang/Include/Common.h +++ b/glslang/Include/Common.h @@ -38,7 +38,7 @@ #define _COMMON_INCLUDED_ -#if defined(__ANDROID__) || _MSC_VER < 1700 +#if defined(__ANDROID__) || (defined(_MSC_VER) && _MSC_VER < 1700) #include namespace std { template