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:
Vadim Zeitlin
2015-06-12 17:43:33 +02:00
parent 15d9067006
commit cc774bb301
11 changed files with 98 additions and 1 deletions

View File

@@ -86,6 +86,8 @@
#define HAVE_WGETCWD
#endif
wxDECL_FOR_STRICT_MINGW32(int, _fileno, (FILE*))
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------