Only disable use of non-ANSI functions in strict ANSI mode under Windows.
The changes of r62518 fixed compilation of wx headers in g++ strict ANSI mode (enabled by th use of -ansi or -std=c++{98,0x} options) with mingw32 but broke it when using g++ in ANSI mode under Unix. The problems arose at least due to redeclaration of isascii() with different exception specifier and due to the lack of wxCRT_StrdupA() definition in the library. Fix this by simply not disabling the use of non-ANSI functions such as isascii() and strdup() under Unix as they are still available in the headers by default because of _GNU_SOURCE predefined by g++. Notice that if _GNU_SOURCE is explicitly undefined, compilation would probably still be broken. To fix this we might check whether __USE_SVID is defined under Linux. Unfortunately doing tests in configure is not an answer as wxWidgets might not be compiled with the same -std option as the programs using it, so there is no obviously correct way to fix this. See #11374. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63164 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -357,7 +357,7 @@ enum wxFileKind
|
||||
|
||||
// finally the default char-type versions
|
||||
#if wxUSE_UNICODE
|
||||
#if wxUSE_UNICODE_MSLU || defined(__STRICT_ANSI__)
|
||||
#if wxUSE_UNICODE_MSLU || defined(__WX_STRICT_ANSI_GCC__)
|
||||
// implement the missing file functions in Win9x ourselves
|
||||
WXDLLIMPEXP_BASE int wxMSLU__wopen(const wxChar *name,
|
||||
int flags, int mode);
|
||||
|
Reference in New Issue
Block a user