From e09f554a2f2749ee3a8a85a218376f2ed0a69d4b Mon Sep 17 00:00:00 2001 From: Stas Degteff Date: Sun, 20 Feb 2011 00:08:06 +0000 Subject: [PATCH] Use common-use macro HAVE_VSNPRINTF and HAVE__VSNPRINTF instead G_HAS_VSNPRINTF --- goldlib/gall/gdefs.h | 1 - goldlib/gall/gstrutil.cpp | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/goldlib/gall/gdefs.h b/goldlib/gall/gdefs.h index 182c94c..4ed35f9 100644 --- a/goldlib/gall/gdefs.h +++ b/goldlib/gall/gdefs.h @@ -41,7 +41,6 @@ #ifdef __WIN32__ #include -#define G_HAS_VSNPRINTF #else typedef char TCHAR; #endif diff --git a/goldlib/gall/gstrutil.cpp b/goldlib/gall/gstrutil.cpp index 3afb689..ae0b013 100644 --- a/goldlib/gall/gstrutil.cpp +++ b/goldlib/gall/gstrutil.cpp @@ -718,7 +718,9 @@ int gsprintf(TCHAR* buffer, size_t sizeOfBuffer, const TCHAR* __file, int __line if (ret < 0) #else 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); #else ret = vsprintf(buffer, format, argptr);