Fixed --test-build-*.

Fixes various aspects of --test-build-devpoll, --test-build-eventport, and
--test-build-epoll.

In particular, if --test-build-devpoll was used on Linux, then "devpoll"
event method would be preferred over "epoll".  Also, wrong definitions of
event macros were chosen.
This commit is contained in:
Ruslan Ermilov 2016-03-28 19:29:18 +03:00
parent 3d791c46f5
commit f5fff1eda0
3 changed files with 5 additions and 4 deletions

View File

@ -1208,7 +1208,7 @@ ngx_event_core_init_conf(ngx_cycle_t *cycle, void *conf)
#endif
#if (NGX_HAVE_DEVPOLL)
#if (NGX_HAVE_DEVPOLL) && !(NGX_TEST_BUILD_DEVPOLL)
module = &ngx_devpoll_module;

View File

@ -343,7 +343,8 @@ extern ngx_event_actions_t ngx_event_actions;
#define NGX_DISABLE_EVENT EV_DISABLE
#elif (NGX_HAVE_DEVPOLL || NGX_HAVE_EVENTPORT)
#elif (NGX_HAVE_DEVPOLL && !(NGX_TEST_BUILD_DEVPOLL)) \
|| (NGX_HAVE_EVENTPORT && !(NGX_TEST_BUILD_EVENTPORT))
#define NGX_READ_EVENT POLLIN
#define NGX_WRITE_EVENT POLLOUT
@ -352,7 +353,7 @@ extern ngx_event_actions_t ngx_event_actions;
#define NGX_ONESHOT_EVENT 1
#elif (NGX_HAVE_EPOLL)
#elif (NGX_HAVE_EPOLL) && !(NGX_TEST_BUILD_EPOLL)
#define NGX_READ_EVENT (EPOLLIN|EPOLLRDHUP)
#define NGX_WRITE_EVENT EPOLLOUT

View File

@ -128,7 +128,7 @@
#endif
#if (NGX_HAVE_DEVPOLL)
#if (NGX_HAVE_DEVPOLL) && !(NGX_TEST_BUILD_DEVPOLL)
#include <sys/ioctl.h>
#include <sys/devpoll.h>
#endif