Use common-use macro HAVE_VSNPRINTF and HAVE__VSNPRINTF instead G_HAS_VSNPRINTF
This commit is contained in:
parent
65d6e4d2e9
commit
e09f554a2f
@ -41,7 +41,6 @@
|
|||||||
|
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
#define G_HAS_VSNPRINTF
|
|
||||||
#else
|
#else
|
||||||
typedef char TCHAR;
|
typedef char TCHAR;
|
||||||
#endif
|
#endif
|
||||||
|
@ -718,7 +718,9 @@ int gsprintf(TCHAR* buffer, size_t sizeOfBuffer, const TCHAR* __file, int __line
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
#else
|
#else
|
||||||
buffer[sizeOfBuffer-1] = 0;
|
buffer[sizeOfBuffer-1] = 0;
|
||||||
#if defined( G_HAS_VSNPRINTF )
|
#if defined( HAVE_VSNPRINTF )
|
||||||
|
ret = vsnprintf(buffer, sizeOfBuffer, format, argptr);
|
||||||
|
#elif defined( HAVE__VSNPRINTF )
|
||||||
ret = _vsnprintf(buffer, sizeOfBuffer, format, argptr);
|
ret = _vsnprintf(buffer, sizeOfBuffer, format, argptr);
|
||||||
#else
|
#else
|
||||||
ret = vsprintf(buffer, format, argptr);
|
ret = vsprintf(buffer, format, argptr);
|
||||||
|
Reference in New Issue
Block a user