vsprintf() is ANSI so there is normally no need to test for it
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 26 Nov 1998 15:30:26 +0000 (15:30 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 26 Nov 1998 15:30:26 +0000 (15:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/string.cpp

index 8d3af4c8e6d5e5495e0b859e6178001fc4a6a63a..e9e906d49bde49fbc5ef0bbc0fb6f7635dda3a6c 100644 (file)
@@ -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))