mirror of
https://github.com/nginx/nginx.git
synced 2024-12-19 21:53:31 -06:00
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:
parent
3d791c46f5
commit
f5fff1eda0
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user