Fix building and using the library with MinGW -std=c++{98,11} options.
These options enable "strict ANSI" mode in MinGW which omits declarations of POSIX functions from the standard headers. To allow the library and, possibly even more importantly, the user code including our headers, to compile with these options, declare the functions that we need ourselves. This might appear to go against the spirit of "strict ANSI" mode, but the only alternative would be to not use such functions at all and silently cripple the library when -std=c++NN is used, compared to -std=g++NN case, and this doesn't seem appealing neither. Closes #16984.
This commit is contained in:
@@ -73,6 +73,10 @@
|
||||
#include <xlocale.h>
|
||||
#endif
|
||||
|
||||
wxDECL_FOR_STRICT_MINGW32(int, vswprintf, (wchar_t*, const wchar_t*, __VALIST));
|
||||
wxDECL_FOR_STRICT_MINGW32(int, _putws, (const wchar_t*));
|
||||
wxDECL_FOR_STRICT_MINGW32(void, _wperror, (const wchar_t*));
|
||||
|
||||
WXDLLIMPEXP_BASE size_t wxMB2WC(wchar_t *buf, const char *psz, size_t n)
|
||||
{
|
||||
// assume that we have mbsrtowcs() too if we have wcsrtombs()
|
||||
|
||||
Reference in New Issue
Block a user