Don't use vsnprintf_s - breaks Windows XP (and Solaris about to be obsoleted by Oracle anyway)

This commit is contained in:
Twinaphex 2016-12-04 04:12:48 +01:00 committed by twinaphex
parent f85885835c
commit a91e2e2466

View File

@ -37,19 +37,9 @@
#ifndef _COMMON_INCLUDED_
#define _COMMON_INCLUDED_
#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) || defined MINGW_HAS_SECURE_API
#include <basetsd.h>
#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 <sys/int_types.h>
#define UINT_PTR uintptr_t
#else
#define safe_vsprintf(buf,max,format,args) vsnprintf((buf), (max), (format), (args))
#include <stdint.h>
#define UINT_PTR uintptr_t
#endif
#if defined(__ANDROID__) || _MSC_VER < 1700
#include <sstream>