[nginx] Fixed --test-build-*.
Ruslan Ermilov
ru at nginx.com
Mon Mar 28 16:31:47 UTC 2016
details: http://hg.nginx.org/nginx/rev/9fd68d5009e3
branches:
changeset: 6465:9fd68d5009e3
user: Ruslan Ermilov <ru at nginx.com>
date: Mon Mar 28 19:29:18 2016 +0300
description:
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.
diffstat:
src/event/ngx_event.c | 2 +-
src/event/ngx_event.h | 5 +++--
src/os/unix/ngx_posix_config.h | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
diffs (46 lines):
diff -r 088ef087a011 -r 9fd68d5009e3 src/event/ngx_event.c
--- a/src/event/ngx_event.c Mon Mar 28 13:35:25 2016 +0300
+++ b/src/event/ngx_event.c Mon Mar 28 19:29:18 2016 +0300
@@ -1208,7 +1208,7 @@ ngx_event_core_init_conf(ngx_cycle_t *cy
#endif
-#if (NGX_HAVE_DEVPOLL)
+#if (NGX_HAVE_DEVPOLL) && !(NGX_TEST_BUILD_DEVPOLL)
module = &ngx_devpoll_module;
diff -r 088ef087a011 -r 9fd68d5009e3 src/event/ngx_event.h
--- a/src/event/ngx_event.h Mon Mar 28 13:35:25 2016 +0300
+++ b/src/event/ngx_event.h Mon Mar 28 19:29:18 2016 +0300
@@ -343,7 +343,8 @@ extern ngx_event_actions_t ngx_event_a
#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_a
#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
diff -r 088ef087a011 -r 9fd68d5009e3 src/os/unix/ngx_posix_config.h
--- a/src/os/unix/ngx_posix_config.h Mon Mar 28 13:35:25 2016 +0300
+++ b/src/os/unix/ngx_posix_config.h Mon Mar 28 19:29:18 2016 +0300
@@ -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
More information about the nginx-devel
mailing list