X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/53c6e7ccd2c012afe1819485260e9d34eba09538..5e9f40263d3f6d0aa56d8655500c346f87817646:/src/common/string.cpp diff --git a/src/common/string.cpp b/src/common/string.cpp index 8d3af4c8e6..c4fdd0bb18 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -41,6 +41,12 @@ #include #include +// This probably isn't right, what should it be Vadim? +// Otherwise we end up with no wxVsprintf defined. +#ifdef __WXMOTIF__ +#define HAVE_VPRINTF +#endif + #ifdef wxUSE_WCSRTOMBS #include // for wcsrtombs(), see comments where it's used #endif // GNU @@ -102,22 +108,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))