diff --git a/glslang/Include/Common.h b/glslang/Include/Common.h index f7448fa0..f2fb10bf 100644 --- a/glslang/Include/Common.h +++ b/glslang/Include/Common.h @@ -37,21 +37,8 @@ #ifndef _COMMON_INCLUDED_ #define _COMMON_INCLUDED_ -#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)) -#elif defined (solaris) - #define safe_vsprintf(buf,max,format,args) vsnprintf((buf), (max), (format), (args)) - #include - #define UINT_PTR uintptr_t -#else - #define safe_vsprintf(buf,max,format,args) vsnprintf((buf), (max), (format), (args)) - #include - #define UINT_PTR uintptr_t -#endif -#if defined(__ANDROID__) || (defined(_MSC_VER) && _MSC_VER < 1700) +#if defined(__ANDROID__) || _MSC_VER < 1700 #include namespace std { template @@ -63,6 +50,22 @@ std::string to_string(const T& val) { } #endif +#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) || defined MINGW_HAS_SECURE_API + #include + #ifndef snprintf + #define snprintf sprintf_s + #endif + #define safe_vsprintf(buf,max,format,args) vsnprintf_s((buf), (max), (max), (format), (args)) +#elif defined (solaris) + #define safe_vsprintf(buf,max,format,args) vsnprintf((buf), (max), (format), (args)) + #include + #define UINT_PTR uintptr_t +#else + #define safe_vsprintf(buf,max,format,args) vsnprintf((buf), (max), (format), (args)) + #include + #define UINT_PTR uintptr_t +#endif + #if defined(_MSC_VER) && _MSC_VER < 1800 inline long long int strtoll (const char* str, char** endptr, int base) {