From c8a96f45f7b50583935f0cef0e1bc64b37dd100c Mon Sep 17 00:00:00 2001 From: Neil Richardson Date: Sat, 15 Aug 2015 08:29:37 -0700 Subject: [PATCH] Fixed VS2015 build --- glslang/Include/Common.h | 2 +- glslang/MachineIndependent/preprocessor/PpTokens.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/glslang/Include/Common.h b/glslang/Include/Common.h index 6076a34d..8fe43acd 100644 --- a/glslang/Include/Common.h +++ b/glslang/Include/Common.h @@ -37,7 +37,7 @@ #ifndef _COMMON_INCLUDED_ #define _COMMON_INCLUDED_ -#if defined _MSC_VER || defined MINGW_HAS_SECURE_API +#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) || defined MINGW_HAS_SECURE_API #include #define snprintf sprintf_s #define safe_vsprintf(buf,max,format,args) vsnprintf_s((buf), (max), (max), (format), (args)) diff --git a/glslang/MachineIndependent/preprocessor/PpTokens.cpp b/glslang/MachineIndependent/preprocessor/PpTokens.cpp index ab5f78b8..642793d9 100644 --- a/glslang/MachineIndependent/preprocessor/PpTokens.cpp +++ b/glslang/MachineIndependent/preprocessor/PpTokens.cpp @@ -80,7 +80,7 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // For recording and playing back the stream of tokens in a macro definition. // -#ifdef _WIN32 +#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) #define _CRT_SECURE_NO_WARNINGS #define snprintf sprintf_s #endif