Use common-use macro HAVE_VSNPRINTF and HAVE__VSNPRINTF instead G_HAS_VSNPRINTF

This commit is contained in:
Stas Degteff 2011-02-20 00:08:06 +00:00
parent 65d6e4d2e9
commit e09f554a2f
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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);