Remove misleading test for __USE_MINGW_ANSI_STDIO

This test, added in 06458cb89f, is useless as it
doesn't matter what the value of __USE_MINGW_ANSI_STDIO when compiling the
library is, as the real wprintf() implemented used by wxPrintf() is chosen
depending on __USE_MINGW_ANSI_STDIO value when compiling the application as
wxPrintf() is defined inline.

Just remove it because "%ls" works in both cases anyhow, so always use it with
MinGW.
This commit is contained in:
Vadim Zeitlin 2016-04-12 16:44:16 +02:00
parent 0ee25aaa76
commit d62c535d4c

View File

@ -411,12 +411,14 @@ private:
}; };
// Distinguish between the traditional Windows (and MSVC) behaviour and Cygwin // Distinguish between the traditional Windows (and MSVC) behaviour and Cygwin
// (which is always Unix-like) and MinGW which can use either depending on the // (which is always Unix-like) and MinGW. The last one is the most interesting
// "ANSI stdio" option value (which is normally set to either 0 or 1, but test // case as it can behave either as MSVC (__USE_MINGW_ANSI_STDIO=0) or as POSIX
// for it in a way which works even if it's not defined at all, just in case). // (__USE_MINGW_ANSI_STDIO=1, which is explicitly set by including any standard
// C++ header such as e.g. <string>). Luckily, "%ls" and "%lc" work in both
// cases, at least for recent MinGW versions, so just use it always.
#if defined(__WINDOWS__) && \ #if defined(__WINDOWS__) && \
!defined(__CYGWIN__) && \ !defined(__CYGWIN__) && \
(!defined(__MINGW32__) || (__USE_MINGW_ANSI_STDIO +0 == 0)) !defined(__MINGW32__)
// on Windows, we should use %s and %c regardless of the build: // on Windows, we should use %s and %c regardless of the build:
class wxPrintfFormatConverterWchar : public wxFormatConverterBase<wchar_t> class wxPrintfFormatConverterWchar : public wxFormatConverterBase<wchar_t>