Don't undefine __WXMSW__ for console mode applications using wxWidgets.

This partially undoes the changes of r73290 by keeping __WXMSW__ defined for
the console mode user applications and only undefining it when building
wxWidgets itself.

This allows the existing code using __WXMSW__ to continue compiling correctly
with wxWidgets 3.0.

Closes #15579.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-10-14 15:08:45 +00:00
parent 6e6e6d179f
commit b3b93c582a
2 changed files with 11 additions and 3 deletions

View File

@@ -36,7 +36,10 @@ using @ifdef_ and not @if_.
@itemdef{__WXMAC__, old define, same as @c __WXOSX__} @itemdef{__WXMAC__, old define, same as @c __WXOSX__}
@itemdef{__WXMOTIF__, Motif} @itemdef{__WXMOTIF__, Motif}
@itemdef{__WXMOTIF20__, Motif 2.0 or higher} @itemdef{__WXMOTIF20__, Motif 2.0 or higher}
@itemdef{__WXMSW__, GUI using <a href="http://en.wikipedia.org/wiki/Windows_User">Windows Controls</a>} @itemdef{__WXMSW__, GUI using <a href="http://en.wikipedia.org/wiki/Windows_User">Windows Controls</a>.
Notice that for compatibility reasons, this symbol is defined for console
applications under Windows as well, but it should only be used in the GUI code
while @c __WINDOWS__ should be used for the platform tests.}
@itemdef{__WXOSX__, OS X GUI using any Apple widget framework (Carbon, AppKit or UIKit)} @itemdef{__WXOSX__, OS X GUI using any Apple widget framework (Carbon, AppKit or UIKit)}
@itemdef{__WXOSX_IPHONE__, OS X iPhone (UIKit)} @itemdef{__WXOSX_IPHONE__, OS X iPhone (UIKit)}
@itemdef{__WXOSX_CARBON__, Mac OS X using Carbon} @itemdef{__WXOSX_CARBON__, Mac OS X using Carbon}

View File

@@ -95,8 +95,13 @@
# endif # endif
#endif /* __WINDOWS__ */ #endif /* __WINDOWS__ */
/* Don't use widget toolkit specific code in non-GUI code */ /*
#if defined(wxUSE_GUI) && !wxUSE_GUI Don't use widget toolkit specific code in non-GUI code in the library
itself to ensure that the same base library is used for both MSW and GTK
ports. But keep __WXMSW__ defined for (console) applications using
wxWidgets for compatibility.
*/
#if defined(WXBUILDING) && defined(wxUSE_GUI) && !wxUSE_GUI
# ifdef __WXMSW__ # ifdef __WXMSW__
# undef __WXMSW__ # undef __WXMSW__
# endif # endif