#include <string.h>
#include <stdlib.h>
+// 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 <wchar.h> // for wcsrtombs(), see comments where it's used
#endif // GNU
#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))