From 0872eaf957aaf4138dbba007df662ce5eae374e2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Thu, 21 Jul 2005 17:08:28 +0000 Subject: [PATCH] wxOS2 with Open Watcom: correct PCH usage, missing headers, warning fixes, source cleaning and other Watcom adjustements. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/chkconf.h | 5 ++--- include/wx/debug.h | 3 +-- include/wx/defs.h | 2 +- include/wx/dynlib.h | 4 +--- include/wx/filefn.h | 3 +++ include/wx/platform.h | 2 +- include/wx/popupwin.h | 15 +++++++-------- 7 files changed, 16 insertions(+), 18 deletions(-) diff --git a/include/wx/chkconf.h b/include/wx/chkconf.h index 8ae71dcf15..e9760937ac 100644 --- a/include/wx/chkconf.h +++ b/include/wx/chkconf.h @@ -1513,7 +1513,7 @@ # if !wxUSE_DOC_VIEW_ARCHITECTURE # ifdef wxABORT_ON_CONFIG_ERROR -# error "MDI requires wxUSE_DOC_VIEW_ARCHITECTURE" +# error "wxUSE_MDI_ARCHITECTURE requires wxUSE_DOC_VIEW_ARCHITECTURE" # else # undef wxUSE_DOC_VIEW_ARCHITECTURE # define wxUSE_DOC_VIEW_ARCHITECTURE 1 @@ -1524,7 +1524,7 @@ #if !wxUSE_FILEDLG # if wxUSE_DOC_VIEW_ARCHITECTURE || wxUSE_WXHTML_HELP # ifdef wxABORT_ON_CONFIG_ERROR -# error "wxFileDialog must be compiled as well" +# error "wxUSE_FILEDLG is required by wxUSE_DOC_VIEW_ARCHITECTURE and wxUSE_WXHTML_HELP!" # else # undef wxUSE_FILEDLG # define wxUSE_FILEDLG 1 @@ -1684,4 +1684,3 @@ #endif /* wxUSE_SOCKETS */ #endif /* wxUSE_GUI */ - diff --git a/include/wx/debug.h b/include/wx/debug.h index c944baba82..c2fc985ec2 100644 --- a/include/wx/debug.h +++ b/include/wx/debug.h @@ -198,7 +198,7 @@ It may be used both within a function and in the global scope. */ -#ifdef __WATCOMC__ +#if defined(__WATCOMC__) && defined(__cplusplus) /* avoid "unused symbol" warning */ #define wxCOMPILE_TIME_ASSERT(expr, msg) \ class wxMAKE_UNIQUE_ASSERT_NAME { \ @@ -249,4 +249,3 @@ #endif /* __cplusplus */ #endif /* _WX_DEBUG_H_ */ - diff --git a/include/wx/defs.h b/include/wx/defs.h index e4f6b3d865..6da83c521e 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -902,7 +902,7 @@ inline void *wxUIntToPtr(wxUIntPtr p) #define wxLongLong_t __int64 #define wxLongLongSuffix i64 #define wxLongLongFmtSpec _T("L") -#elif (defined(__WATCOMC__) && (defined(__WIN32__) || defined(__DOS__))) +#elif (defined(__WATCOMC__) && (defined(__WIN32__) || defined(__DOS__) || defined(__OS2__))) #define wxLongLong_t __int64 #define wxLongLongSuffix i64 #define wxLongLongFmtSpec _T("L") diff --git a/include/wx/dynlib.h b/include/wx/dynlib.h index a5dd3dbe52..a5273869fd 100644 --- a/include/wx/dynlib.h +++ b/include/wx/dynlib.h @@ -23,10 +23,8 @@ #include "wx/string.h" #include "wx/dynarray.h" -// FIXME: can this go in private.h or something too?? #if defined(__WXPM__) || defined(__EMX__) -#define INCL_DOS -#include +#include "wx/os2/private.h" #endif #ifdef __WXMSW__ diff --git a/include/wx/filefn.h b/include/wx/filefn.h index f2e52808f6..84e5c44013 100644 --- a/include/wx/filefn.h +++ b/include/wx/filefn.h @@ -49,6 +49,9 @@ // __OS2__ and __UNIX__ are defined. #include #include "wx/os2/private.h" + #ifdef __WATCOMC__ + #include + #endif #include #ifdef __EMX__ #include diff --git a/include/wx/platform.h b/include/wx/platform.h index d3f6c0c53e..2e0320a144 100644 --- a/include/wx/platform.h +++ b/include/wx/platform.h @@ -494,6 +494,7 @@ ( defined( __CYGWIN__ ) && defined( __WINDOWS__ ) ) || \ (defined(__WATCOMC__) && __WATCOMC__ >= 1200) ) && \ !defined(__DOS__) && \ + !defined(__WXOS2__) && \ !defined(__WXMOTIF__) && \ !defined(__WXGTK__) && \ !defined(__WXX11__) && \ @@ -560,4 +561,3 @@ #endif #endif /* _WX_PLATFORM_H_ */ - diff --git a/include/wx/popupwin.h b/include/wx/popupwin.h index a347db9dc6..e971b49a00 100644 --- a/include/wx/popupwin.h +++ b/include/wx/popupwin.h @@ -56,17 +56,17 @@ public: // include the real class declaration -#ifdef __WXMSW__ +#if defined(__WXMSW__) #include "wx/msw/popupwin.h" -#elif __WXPM__ +#elif defined(__WXPM__) #include "wx/os2/popupwin.h" -#elif __WXGTK__ +#elif defined(__WXGTK__) #include "wx/gtk/popupwin.h" -#elif __WXX11__ +#elif defined(__WXX11__) #include "wx/x11/popupwin.h" -#elif __WXMOTIF__ +#elif defined(__WXMOTIF__) #include "wx/motif/popupwin.h" -#elif __WXMGL__ +#elif defined(__WXMGL__) #include "wx/mgl/popupwin.h" #else #error "wxPopupWindow is not supported under this platform." @@ -131,7 +131,7 @@ protected: // check if the mouse needs captured or released void OnIdle(wxIdleEvent& event); #endif - + // the child of this popup if any wxWindow *m_child; @@ -190,4 +190,3 @@ protected: #endif // wxUSE_POPUPWIN #endif // _WX_POPUPWIN_H_BASE_ - -- 2.45.2