From de274a5cbba9c08c3e1ddfa990374494df90ca0f Mon Sep 17 00:00:00 2001 From: Stefan Neis Date: Fri, 14 Feb 2003 17:25:45 +0000 Subject: [PATCH] Insure consistent definition of wxAppInitializerFunction for wxBase/MSW. (previously, you could end up with different ones depending on include order, now platform.h is always (implicitly) included first, so __WXMSW__ is guaranteed to be defined even in wxBase/MSW builds.) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/app.h | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/include/wx/app.h b/include/wx/app.h index 4c9f5b8b9d..e9db923a6f 100644 --- a/include/wx/app.h +++ b/include/wx/app.h @@ -17,22 +17,6 @@ #pragma interface "appbase.h" #endif -// ---------------------------------------------------------------------------- -// typedefs -// ---------------------------------------------------------------------------- - -#if (defined(__WXMSW__) && !defined(__WXMICROWIN__)) || defined (__WXPM__) - class WXDLLEXPORT wxApp; - typedef wxApp* (*wxAppInitializerFunction)(); -#else - // returning wxApp* won't work with gcc - #include "wx/object.h" - - typedef wxObject* (*wxAppInitializerFunction)(); -#endif - -class WXDLLEXPORT wxCmdLineParser; - // ---------------------------------------------------------------------------- // headers we have to include here // ---------------------------------------------------------------------------- @@ -49,6 +33,25 @@ class WXDLLEXPORT wxCmdLineParser; #include "wx/build.h" +// ---------------------------------------------------------------------------- +// typedefs +// ---------------------------------------------------------------------------- +// Do includes first to insure that even wxBase consistently uses +// the wxMSW case for defining wxAppInitializerFunction. +// (otherwise, __WXMSW__ will not yet be set, if app.h is the +// first file to be included). + +#if (defined(__WXMSW__) && !defined(__WXMICROWIN__)) || defined (__WXPM__) + class WXDLLEXPORT wxApp; + typedef wxApp* (*wxAppInitializerFunction)(); +#else + // returning wxApp* won't work with gcc + #include "wx/object.h" + + typedef wxObject* (*wxAppInitializerFunction)(); +#endif + +class WXDLLEXPORT wxCmdLineParser; class WXDLLEXPORT wxLog; class WXDLLEXPORT wxMessageOutput;