From: InsertAReallyCreativeNameHere Date: Wed, 8 Sep 2021 20:43:23 +0000 (+1000) Subject: Change MINGW_HAS_SECURE_API checks. X-Git-Tag: upstream/1.3.239~186^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=12e27e17deb3102f1f6f08ec19caf5e32becb3f8;p=platform%2Fupstream%2Fglslang.git Change MINGW_HAS_SECURE_API checks. MINGW_HAS_SECURE_API can be defined as 0, but this will be ignored here without this change. Without these *_s "safe" functions, this code will also build on Windows XP. --- diff --git a/glslang/Include/Common.h b/glslang/Include/Common.h index 1e47239..e7b5e07 100644 --- a/glslang/Include/Common.h +++ b/glslang/Include/Common.h @@ -61,7 +61,7 @@ std::string to_string(const T& val) { } #endif -#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) || defined MINGW_HAS_SECURE_API +#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) || MINGW_HAS_SECURE_API #include #ifndef snprintf #define snprintf sprintf_s @@ -213,7 +213,7 @@ template T Max(const T a, const T b) { return a > b ? a : b; } // // Create a TString object from an integer. // -#if defined _MSC_VER || defined MINGW_HAS_SECURE_API +#if defined _MSC_VER || MINGW_HAS_SECURE_API inline const TString String(const int i, const int base = 10) { char text[16]; // 32 bit ints are at most 10 digits in base 10