From: Vadim Zeitlin Date: Thu, 26 Nov 1998 15:30:26 +0000 (+0000) Subject: vsprintf() is ANSI so there is normally no need to test for it X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7aa88ac4af764fa92c781056bc23103cadea21a4 vsprintf() is ANSI so there is normally no need to test for it git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/string.cpp b/src/common/string.cpp index 8d3af4c8e6..e9e906d49b 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -102,22 +102,19 @@ extern const char *g_szNul = &g_strEmpty.dummy; #endif #ifdef __WXMSW__ - #ifdef _MSC_VER - #define wxVsprintf _vsnprintf - #endif + #ifdef _MSC_VER + #define wxVsprintf _vsnprintf + #endif #else - #if defined ( HAVE_VSNPRINTF ) - #define wxVsprintf vsnprintf - #endif + #if defined ( HAVE_VSNPRINTF ) + #define wxVsprintf vsnprintf + #endif #endif #ifndef wxVsprintf - #ifdef HAVE_VPRINTF + // vsprintf() is ANSI so we can always use it, but it's unsafe! #define wxVsprintf(buffer,len,format,argptr) vsprintf(buffer,format, argptr) #pragma message("Using sprintf() because no snprintf()-like function defined") - #else - #pragma error("No vsnprintf() or vsprintf() function available.") - #endif #endif NAMESPACE istream& operator>>(NAMESPACE istream& is, wxString& WXUNUSED(str))