From 00d1bc89ed3811701195bf5ddb400a0a0067126f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 8 Feb 2011 14:11:45 -0800 Subject: move poll support checks to kgio.h We may use poll elsewhere... --- ext/kgio/kgio.h | 3 +++ ext/kgio/poll.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ext/kgio/kgio.h b/ext/kgio/kgio.h index 1fdc36d..9056cef 100644 --- a/ext/kgio/kgio.h +++ b/ext/kgio/kgio.h @@ -43,5 +43,8 @@ void kgio_autopush_send(VALUE); VALUE kgio_call_wait_writable(VALUE io); VALUE kgio_call_wait_readable(VALUE io); +#if defined(HAVE_RB_THREAD_BLOCKING_REGION) && defined(HAVE_POLL) +# define USE_KGIO_POLL +#endif /* USE_KGIO_POLL */ #endif /* KGIO_H */ diff --git a/ext/kgio/poll.c b/ext/kgio/poll.c index 41caafd..0a4cf5a 100644 --- a/ext/kgio/poll.c +++ b/ext/kgio/poll.c @@ -1,5 +1,5 @@ #include "kgio.h" -#if defined(HAVE_RB_THREAD_BLOCKING_REGION) && defined(HAVE_POLL) +#if defined(USE_KGIO_POLL) #include #ifdef HAVE_RUBY_ST_H # include @@ -179,8 +179,8 @@ void init_kgio_poll(void) c(POLLHUP); c(POLLNVAL); } -#else /* ! HAVE_RB_THREAD_BLOCKING_REGION */ +#else /* ! USE_KGIO_POLL */ void init_kgio_poll(void) { } -#endif /* ! HAVE_RB_THREAD_BLOCKIONG_REGION */ +#endif /* ! USE_KGIO_POLL */ -- cgit v1.2.3-24-ge0c7