From 8e913f796a6a0431c79ffb79a2ba5922ff770eca Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 10 Jul 2007 23:19:57 +0000 Subject: [PATCH] compilation fixes for wxUSE_TIMER==0 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/unix/baseunix.cpp | 9 ++++++++- src/unix/evtloopunix.cpp | 5 ++++- src/unix/timerunx.cpp | 4 ++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/unix/baseunix.cpp b/src/unix/baseunix.cpp index 16aa2c8c58..fb2bdf58ba 100644 --- a/src/unix/baseunix.cpp +++ b/src/unix/baseunix.cpp @@ -33,7 +33,10 @@ #include "wx/apptrait.h" #include "wx/unix/execute.h" #include "wx/evtloop.h" -#include "wx/unix/private/timer.h" + +#if wxUSE_TIMER + #include "wx/unix/private/timer.h" +#endif // wxUSE_TIMER // for waitpid() #include @@ -83,6 +86,8 @@ wxConsoleAppTraits::WaitForChild(wxExecuteData& execData) return exitcode; } +#if wxUSE_TIMER + wxTimerImpl *wxConsoleAppTraits::CreateTimerImpl(wxTimer *timer) { // this doesn't work yet as there is no main loop in console applications @@ -90,6 +95,8 @@ wxTimerImpl *wxConsoleAppTraits::CreateTimerImpl(wxTimer *timer) return new wxUnixTimerImpl(timer); } +#endif // wxUSE_TIMER + wxEventLoopBase *wxConsoleAppTraits::CreateEventLoop() { return new wxEventLoop(); diff --git a/src/unix/evtloopunix.cpp b/src/unix/evtloopunix.cpp index d9e4100457..ff12e32638 100644 --- a/src/unix/evtloopunix.cpp +++ b/src/unix/evtloopunix.cpp @@ -29,10 +29,13 @@ #include #include "wx/thread.h" #include "wx/module.h" -#include "wx/generic/private/timer.h" #include "wx/unix/private/epolldispatcher.h" #include "wx/private/selectdispatcher.h" +#if wxUSE_TIMER + #include "wx/generic/private/timer.h" +#endif + #define TRACE_EVENTS _T("events") //this code should not be compiled when GUI is defined diff --git a/src/unix/timerunx.cpp b/src/unix/timerunx.cpp index c7734b4235..9c7468ea53 100644 --- a/src/unix/timerunx.cpp +++ b/src/unix/timerunx.cpp @@ -18,6 +18,8 @@ #include "wx/wxprec.h" +#if wxUSE_TIMER + #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/module.h" @@ -254,3 +256,5 @@ wxUsecClock_t wxGetLocalTimeUsec() return wxGetLocalTimeMillis() * 1000L; } +#endif // wxUSE_TIMER + -- 2.45.2