#include "wx/module.h"
#include "wx/timer.h"
#include "wx/unix/private.h"
-#include "wx/log.h"
#ifndef WX_PRECOMP
#include "wx/hash.h"
+ #include "wx/log.h"
+ #include "wx/intl.h"
#endif
#ifdef HAVE_SYS_SELECT_H
{
for ( int n = 0; n < Max; n++ )
{
- if ( wxFD_ISSET(fd, &m_fds[n]) )
+ if ( wxFD_ISSET(fd, (fd_set*) &m_fds[n]) )
return true;
}
wxLogTrace(wxSelectDispatcher_Trace,
_T("Registered fd %d for %s events"), fd, ms_names[n]);
}
- else if ( wxFD_ISSET(fd, &m_fds[n]) )
+ else if ( wxFD_ISSET(fd, (fd_set*) &m_fds[n]) )
{
wxFD_CLR(fd, &m_fds[n]);
wxLogTrace(wxSelectDispatcher_Trace,
{
for ( int n = 0; n < Max; n++ )
{
- if ( wxFD_ISSET(fd, &m_fds[n]) )
+ if ( wxFD_ISSET(fd, (fd_set*) &m_fds[n]) )
{
wxLogTrace(wxSelectDispatcher_Trace,
_T("Got %s event on fd %d"), ms_names[n], fd);
bool wxSelectDispatcher::RegisterFD(int fd, wxFDIOHandler *handler, int flags)
{
- if ( !wxFDIODispatcher::RegisterFD(fd, handler, flags) )
+ if ( !wxMappedFDIODispatcher::RegisterFD(fd, handler, flags) )
return false;
if ( !m_sets.SetFD(fd, flags) )
bool wxSelectDispatcher::ModifyFD(int fd, wxFDIOHandler *handler, int flags)
{
- if ( !wxFDIODispatcher::ModifyFD(fd, handler, flags) )
+ if ( !wxMappedFDIODispatcher::ModifyFD(fd, handler, flags) )
return false;
wxASSERT_MSG( fd <= m_maxFD, _T("logic error: registered fd > m_maxFD?") );
return m_sets.SetFD(fd, flags);
}
-wxFDIOHandler *wxSelectDispatcher::UnregisterFD(int fd, int flags)
+bool wxSelectDispatcher::UnregisterFD(int fd, int flags)
{
- wxFDIOHandler * const handler = wxFDIODispatcher::UnregisterFD(fd, flags);
-
m_sets.ClearFD(fd, flags);
// remove the handler if we don't need it any more
}
}
- return handler;
+ return true;
}
void wxSelectDispatcher::ProcessSets(const wxSelectSets& sets)
// continue if we were interrupted by a signal, else bail out
if ( errno != EINTR )
{
- wxLogSysError(_("Failed to monitor IO channels"));
+ wxLogSysError(_("Failed to monitor I/O channels"));
return;
}
break;