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:
@@ -42,7 +42,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#ifdef __VMS
|
#if defined(__DARWIN__)
|
||||||
|
// FIXME: select must be used instead of poll (GD)
|
||||||
|
#elif defined(__VMS)
|
||||||
# include <poll.h>
|
# include <poll.h>
|
||||||
#else
|
#else
|
||||||
# include <sys/poll.h>
|
# include <sys/poll.h>
|
||||||
@@ -245,7 +247,14 @@ static gint wxapp_poll_func( GPollFD *ufds, guint nfds, gint timeout )
|
|||||||
wxMutexGuiLeave();
|
wxMutexGuiLeave();
|
||||||
g_mainThreadLocked = TRUE;
|
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 );
|
res = poll( (struct pollfd*) ufds, nfds, timeout );
|
||||||
|
#endif
|
||||||
|
|
||||||
wxMutexGuiEnter();
|
wxMutexGuiEnter();
|
||||||
g_mainThreadLocked = FALSE;
|
g_mainThreadLocked = FALSE;
|
||||||
|
@@ -42,7 +42,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#ifdef __VMS
|
#if defined(__DARWIN__)
|
||||||
|
// FIXME: select must be used instead of poll (GD)
|
||||||
|
#elif defined(__VMS)
|
||||||
# include <poll.h>
|
# include <poll.h>
|
||||||
#else
|
#else
|
||||||
# include <sys/poll.h>
|
# include <sys/poll.h>
|
||||||
@@ -245,7 +247,14 @@ static gint wxapp_poll_func( GPollFD *ufds, guint nfds, gint timeout )
|
|||||||
wxMutexGuiLeave();
|
wxMutexGuiLeave();
|
||||||
g_mainThreadLocked = TRUE;
|
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 );
|
res = poll( (struct pollfd*) ufds, nfds, timeout );
|
||||||
|
#endif
|
||||||
|
|
||||||
wxMutexGuiEnter();
|
wxMutexGuiEnter();
|
||||||
g_mainThreadLocked = FALSE;
|
g_mainThreadLocked = FALSE;
|
||||||
|
Reference in New Issue
Block a user