vswprintf() compilation fix for mingw32 with STLport 5.1

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49328 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-10-22 11:32:59 +00:00
parent 296faa4b72
commit ac7bf2261a
2 changed files with 25 additions and 2 deletions

View File

@@ -371,6 +371,14 @@
/* and there is a bug in D Mars tchar.h prior to 8.39.4n, so define as sprintf */
#define wxSprintf sprintf
#endif
#elif defined(__MINGW32__) && ( defined(_STLPORT_VERSION) && _STLPORT_VERSION >= 0x510 )
#if wxUSE_UNICODE
/* MinGW with STLPort 5.1 adds count to swprintf (C99) so prototype conversion see wxchar.cpp */
int wxSprintf (wchar_t*, const wchar_t*, ...);
#else
/* MinGW with STLPort 5.1 has clashing defines for _stprintf so use sprintf */
#define wxSprintf sprintf
#endif
#else
#define wxSprintf _stprintf
#endif
@@ -887,9 +895,10 @@ WXDLLIMPEXP_BASE bool wxOKlibc(); /* for internal use */
/*
MinGW MSVCRT has non-standard vswprintf() (for MSVC compatibility
presumably) and normally _vsnwprintf() is used instead
presumably) and normally _vsnwprintf() is used instead (but as
STLPort 5.1 defines standard vswprintf(), don't do this for it)
*/
#if defined(HAVE_VSWPRINTF) && defined(__MINGW32__)
#if defined(HAVE_VSWPRINTF) && defined(__MINGW32__) && !( defined(_STLPORT_VERSION) && _STLPORT_VERSION >= 0x510 )
#undef HAVE_VSWPRINTF
#endif