From c690ae86dbaecac59a8e16b1ea2fb4d368d62468 Mon Sep 17 00:00:00 2001 From: Gilles Depeyrot Date: Fri, 19 Apr 2002 21:05:25 +0000 Subject: [PATCH] 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 --- src/gtk/app.cpp | 11 ++++++++++- src/gtk1/app.cpp | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index 6e1c25de26..a1bdce64aa 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -42,7 +42,9 @@ #endif #include -#ifdef __VMS +#if defined(__DARWIN__) +// FIXME: select must be used instead of poll (GD) +#elif defined(__VMS) # include #else # include @@ -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; diff --git a/src/gtk1/app.cpp b/src/gtk1/app.cpp index 6e1c25de26..a1bdce64aa 100644 --- a/src/gtk1/app.cpp +++ b/src/gtk1/app.cpp @@ -42,7 +42,9 @@ #endif #include -#ifdef __VMS +#if defined(__DARWIN__) +// FIXME: select must be used instead of poll (GD) +#elif defined(__VMS) # include #else # include @@ -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; -- 2.45.2