poll is not available under Darwin/Mac OS X and select should be used instead

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Gilles Depeyrot 2002-04-19 21:05:25 +00:00
parent b98a5dfcdd
commit c690ae86db
2 changed files with 20 additions and 2 deletions

View File

@ -42,7 +42,9 @@
#endif
#include <unistd.h>
#ifdef __VMS
#if defined(__DARWIN__)
// FIXME: select must be used instead of poll (GD)
#elif defined(__VMS)
# include <poll.h>
#else
# include <sys/poll.h>
@ -245,7 +247,14 @@ static gint wxapp_poll_func( GPollFD *ufds, guint nfds, gint timeout )
wxMutexGuiLeave();
g_mainThreadLocked = TRUE;
#ifdef __DARWIN__
// FIXME: poll is not available under Darwin/Mac OS X and this needs
// to be implemented using select instead (GD)
// what about other BSD derived systems?
res = -1;
#else
res = poll( (struct pollfd*) ufds, nfds, timeout );
#endif
wxMutexGuiEnter();
g_mainThreadLocked = FALSE;

View File

@ -42,7 +42,9 @@
#endif
#include <unistd.h>
#ifdef __VMS
#if defined(__DARWIN__)
// FIXME: select must be used instead of poll (GD)
#elif defined(__VMS)
# include <poll.h>
#else
# include <sys/poll.h>
@ -245,7 +247,14 @@ static gint wxapp_poll_func( GPollFD *ufds, guint nfds, gint timeout )
wxMutexGuiLeave();
g_mainThreadLocked = TRUE;
#ifdef __DARWIN__
// FIXME: poll is not available under Darwin/Mac OS X and this needs
// to be implemented using select instead (GD)
// what about other BSD derived systems?
res = -1;
#else
res = poll( (struct pollfd*) ufds, nfds, timeout );
#endif
wxMutexGuiEnter();
g_mainThreadLocked = FALSE;