workaround for bug in OpenBSD headers

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-09-17 12:24:33 +00:00
parent d55a4efc0f
commit f0e2ef329d
2 changed files with 38 additions and 10 deletions

View File

@@ -44,13 +44,27 @@
#endif #endif
#include <unistd.h> #include <unistd.h>
// TODO: use configure test to detect which of select()/poll() is available!
#if defined(__DARWIN__) #if defined(__DARWIN__)
#warning "FIXME: select must be used instead of poll (GD)" #warning "FIXME: select must be used instead of poll (GD)"
#elif defined(__VMS) #elif defined(__VMS)
#include <poll.h> #include <poll.h>
#else #else
# include <sys/poll.h> // bug in the OpenBSD headers: at least in 3.1 there is no extern "C" in
// neither poll.h nor sys/poll.h which results in link errors later
#ifdef __OPENBSD__
extern "C"
{
#endif #endif
#include <sys/poll.h>
#ifdef __OPENBSD__
};
#endif
#endif // platform
#include "wx/gtk/win_gtk.h" #include "wx/gtk/win_gtk.h"
#include <gtk/gtk.h> #include <gtk/gtk.h>

View File

@@ -44,13 +44,27 @@
#endif #endif
#include <unistd.h> #include <unistd.h>
// TODO: use configure test to detect which of select()/poll() is available!
#if defined(__DARWIN__) #if defined(__DARWIN__)
#warning "FIXME: select must be used instead of poll (GD)" #warning "FIXME: select must be used instead of poll (GD)"
#elif defined(__VMS) #elif defined(__VMS)
#include <poll.h> #include <poll.h>
#else #else
# include <sys/poll.h> // bug in the OpenBSD headers: at least in 3.1 there is no extern "C" in
// neither poll.h nor sys/poll.h which results in link errors later
#ifdef __OPENBSD__
extern "C"
{
#endif #endif
#include <sys/poll.h>
#ifdef __OPENBSD__
};
#endif
#endif // platform
#include "wx/gtk/win_gtk.h" #include "wx/gtk/win_gtk.h"
#include <gtk/gtk.h> #include <gtk/gtk.h>