Added wxUSE_CONSOLE_EVENTLOOP and wxUSE_SELECT/EPOLLDISPATCHER guards;

put checks for them in the new Unix-specific wx/unix/chkconf.h file


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-07-14 19:06:18 +00:00
parent ba51e75bb0
commit a187327964
28 changed files with 203 additions and 21 deletions

View File

@@ -19,7 +19,9 @@
class WXDLLEXPORT wxConsoleAppTraits : public wxConsoleAppTraitsBase
{
public:
#if wxUSE_CONSOLE_EVENTLOOP
virtual wxEventLoopBase *CreateEventLoop();
#endif // wxUSE_CONSOLE_EVENTLOOP
virtual bool CreateEndProcessPipe(wxExecuteData& execData);
virtual bool IsWriteFDOfEndProcessPipe(wxExecuteData& execData, int fd);
virtual void DetachWriteFDOfEndProcessPipe(wxExecuteData& execData);

22
include/wx/unix/chkconf.h Normal file
View File

@@ -0,0 +1,22 @@
/*
* Name: wx/unix/chkconf.h
* Purpose: Unix-specific config settings consistency checks
* Author: Vadim Zeitlin
* Created: 2007-07-14
* RCS-ID: $Id$
* Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwidgets.org>
* Licence: wxWindows licence
*/
/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
#if wxUSE_CONSOLE_EVENTLOOP
# if !wxUSE_SELECT_DISPATCHER && !wxUSE_EPOLL_DISPATCHER
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxSelect/EpollDispatcher needed for console event loop"
# else
# undef wxUSE_SELECT_DISPATCHER
# define wxUSE_SELECT_DISPATCHER 1
# endif
# endif
#endif /* wxUSE_CONSOLE_EVENTLOOP */

View File

@@ -11,6 +11,8 @@
#ifndef _WX_UNIX_EVTLOOP_H_
#define _WX_UNIX_EVTLOOP_H_
#if wxUSE_CONSOLE_EVENTLOOP
#include "wx/private/fdiodispatcher.h"
#include "wx/unix/pipe.h"
@@ -67,4 +69,6 @@ private:
DECLARE_NO_COPY_CLASS(wxConsoleEventLoop)
};
#endif // wxUSE_CONSOLE_EVENTLOOP
#endif // _WX_UNIX_EVTLOOP_H_

View File

@@ -13,7 +13,7 @@
#include "wx/defs.h"
#ifdef HAVE_SYS_EPOLL_H
#ifdef wxUSE_EPOLL_DISPATCHER
#include "wx/private/fdiodispatcher.h"
@@ -42,6 +42,6 @@ private:
int m_epollDescriptor;
};
#endif // HAVE_SYS_EPOLL_H
#endif // wxUSE_EPOLL_DISPATCHER
#endif // _WX_PRIVATE_SOCKETEVTDISPATCH_H_