Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/event
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-11-25 19:17:31 +0300
committerIgor Sysoev <igor@sysoev.ru>2004-11-25 19:17:31 +0300
commitf69060481edeaca075669b50e34ca8ec821c2401 (patch)
tree6fa6907cc2fdfe0ac6bcdf7f63e76a7f8b41f33f /src/event
parent865a7de474a13c5f1202f97fac31565f33a5e1a1 (diff)
nginx-0.1.9-RELEASE importrelease-0.1.9
*) Bugfix: the proxied request was sent without arguments if the request contains "//", "/./", "/../" or "%XX". *) Bugfix: the large compressed responses may be transferred not completely. *) Bugfix: the files bigger than 2G was not transferred on Linux that does not support sendfile64(). *) Bugfix: while the build configuration on Linux the --with-poll_module parameter was required; the bug had appeared in 0.1.8.
Diffstat (limited to 'src/event')
-rw-r--r--src/event/modules/ngx_aio_module.c8
-rw-r--r--src/event/modules/ngx_devpoll_module.c2
-rw-r--r--src/event/modules/ngx_epoll_module.c4
-rw-r--r--src/event/modules/ngx_kqueue_module.c2
-rw-r--r--src/event/modules/ngx_rtsig_module.c4
-rw-r--r--src/event/modules/ngx_select_module.c8
-rw-r--r--src/event/ngx_event.c12
-rw-r--r--src/event/ngx_event.h28
-rw-r--r--src/event/ngx_event_openssl.c6
-rw-r--r--src/event/ngx_event_openssl.h2
-rw-r--r--src/event/ngx_event_pipe.c2
-rw-r--r--src/event/ngx_event_posted.c4
12 files changed, 41 insertions, 41 deletions
diff --git a/src/event/modules/ngx_aio_module.c b/src/event/modules/ngx_aio_module.c
index 398c57102..bdd31cf9c 100644
--- a/src/event/modules/ngx_aio_module.c
+++ b/src/event/modules/ngx_aio_module.c
@@ -9,7 +9,7 @@
#include <ngx_event.h>
#include <ngx_aio.h>
-#if (HAVE_KQUEUE)
+#if (NGX_HAVE_KQUEUE)
#include <ngx_kqueue_module.h>
#endif
@@ -27,7 +27,7 @@ ngx_os_io_t ngx_os_aio = {
ngx_aio_read_chain,
ngx_aio_write,
ngx_aio_write_chain,
- NGX_HAVE_ZEROCOPY
+ 0
};
@@ -64,7 +64,7 @@ ngx_module_t ngx_aio_module = {
-#if (HAVE_KQUEUE)
+#if (NGX_HAVE_KQUEUE)
static int ngx_aio_init(ngx_cycle_t *cycle)
{
@@ -152,7 +152,7 @@ static int ngx_aio_process_events(ngx_cycle_t *cycle)
return ngx_kqueue_module_ctx.actions.process_events(cycle);
}
-#endif /* HAVE_KQUEUE */
+#endif /* NGX_HAVE_KQUEUE */
#if 0
diff --git a/src/event/modules/ngx_devpoll_module.c b/src/event/modules/ngx_devpoll_module.c
index 663e2bfef..1a48ceccf 100644
--- a/src/event/modules/ngx_devpoll_module.c
+++ b/src/event/modules/ngx_devpoll_module.c
@@ -9,7 +9,7 @@
#include <ngx_event.h>
-#if (TEST_BUILD_DEVPOLL)
+#if (NGX_TEST_BUILD_DEVPOLL)
/* Solaris declarations */
diff --git a/src/event/modules/ngx_epoll_module.c b/src/event/modules/ngx_epoll_module.c
index 8096932ec..a2eeab08d 100644
--- a/src/event/modules/ngx_epoll_module.c
+++ b/src/event/modules/ngx_epoll_module.c
@@ -9,7 +9,7 @@
#include <ngx_event.h>
-#if (TEST_BUILD_EPOLL)
+#if (NGX_TEST_BUILD_EPOLL)
/* epoll declarations */
@@ -168,7 +168,7 @@ static int ngx_epoll_init(ngx_cycle_t *cycle)
ngx_event_actions = ngx_epoll_module_ctx.actions;
-#if (HAVE_CLEAR_EVENT)
+#if (NGX_HAVE_CLEAR_EVENT)
ngx_event_flags = NGX_USE_CLEAR_EVENT
#else
ngx_event_flags = NGX_USE_LEVEL_EVENT
diff --git a/src/event/modules/ngx_kqueue_module.c b/src/event/modules/ngx_kqueue_module.c
index e0fae6f93..49c22a982 100644
--- a/src/event/modules/ngx_kqueue_module.c
+++ b/src/event/modules/ngx_kqueue_module.c
@@ -189,7 +189,7 @@ static ngx_int_t ngx_kqueue_init(ngx_cycle_t *cycle)
ngx_event_actions = ngx_kqueue_module_ctx.actions;
ngx_event_flags = NGX_USE_ONESHOT_EVENT
-#if (HAVE_CLEAR_EVENT)
+#if (NGX_HAVE_CLEAR_EVENT)
|NGX_USE_CLEAR_EVENT
#else
|NGX_USE_LEVEL_EVENT
diff --git a/src/event/modules/ngx_rtsig_module.c b/src/event/modules/ngx_rtsig_module.c
index 3c0ea9511..d017f05bd 100644
--- a/src/event/modules/ngx_rtsig_module.c
+++ b/src/event/modules/ngx_rtsig_module.c
@@ -9,7 +9,7 @@
#include <ngx_event.h>
-#if (TEST_BUILD_RTSIG)
+#if (NGX_TEST_BUILD_RTSIG)
#define F_SETSIG 10
#define SIGRTMIN 33
@@ -217,7 +217,7 @@ static ngx_int_t ngx_rtsig_add_connection(ngx_connection_t *c)
return NGX_ERROR;
}
-#if (HAVE_ONESIGFD)
+#if (NGX_HAVE_ONESIGFD)
if (fcntl(c->fd, F_SETAUXFL, O_ONESIGFD) == -1) {
ngx_log_error(NGX_LOG_ALERT, c->log, ngx_errno,
"fcntl(F_SETAUXFL) failed");
diff --git a/src/event/modules/ngx_select_module.c b/src/event/modules/ngx_select_module.c
index 14e6f81a3..0554ee95f 100644
--- a/src/event/modules/ngx_select_module.c
+++ b/src/event/modules/ngx_select_module.c
@@ -258,7 +258,7 @@ static ngx_int_t ngx_select_process_events(ngx_cycle_t *cycle)
ngx_connection_t *c;
ngx_epoch_msec_t delta;
struct timeval tv, *tp;
-#if (HAVE_SELECT_CHANGE_TIMEOUT)
+#if (NGX_HAVE_SELECT_CHANGE_TIMEOUT)
static ngx_epoch_msec_t deltas = 0;
#endif
@@ -362,7 +362,7 @@ static ngx_int_t ngx_select_process_events(ngx_cycle_t *cycle)
err = 0;
}
-#if (HAVE_SELECT_CHANGE_TIMEOUT)
+#if (NGX_HAVE_SELECT_CHANGE_TIMEOUT)
if (timer != NGX_TIMER_INFINITE) {
delta = timer - (tv.tv_sec * 1000 + tv.tv_usec / 1000);
@@ -403,7 +403,7 @@ static ngx_int_t ngx_select_process_events(ngx_cycle_t *cycle)
}
}
-#else /* !(HAVE_SELECT_CHANGE_TIMEOUT) */
+#else /* !(NGX_HAVE_SELECT_CHANGE_TIMEOUT) */
ngx_gettimeofday(&tv);
ngx_time_update(tv.tv_sec);
@@ -427,7 +427,7 @@ static ngx_int_t ngx_select_process_events(ngx_cycle_t *cycle)
}
}
-#endif /* HAVE_SELECT_CHANGE_TIMEOUT */
+#endif /* NGX_HAVE_SELECT_CHANGE_TIMEOUT */
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
"select ready %d", ready);
diff --git a/src/event/ngx_event.c b/src/event/ngx_event.c
index b3bf530a3..bd451bc65 100644
--- a/src/event/ngx_event.c
+++ b/src/event/ngx_event.c
@@ -371,7 +371,7 @@ static ngx_int_t ngx_event_process_init(ngx_cycle_t *cycle)
rev->accept = 1;
-#if (HAVE_DEFERRED_ACCEPT)
+#if (NGX_HAVE_DEFERRED_ACCEPT)
rev->deferred_accept = s[i].deferred_accept;
#endif
@@ -719,7 +719,7 @@ static char *ngx_event_init_conf(ngx_cycle_t *cycle, void *conf)
rtsig = 0;
fd = 0;
-#if (HAVE_EPOLL) && !(TEST_BUILD_EPOLL)
+#if (NGX_HAVE_EPOLL) && !(NGX_TEST_BUILD_EPOLL)
fd = epoll_create(100);
@@ -735,7 +735,7 @@ static char *ngx_event_init_conf(ngx_cycle_t *cycle, void *conf)
#endif
-#if (HAVE_RTSIG)
+#if (NGX_HAVE_RTSIG)
if (module == NULL) {
connections = DEFAULT_CONNECTIONS;
@@ -745,21 +745,21 @@ static char *ngx_event_init_conf(ngx_cycle_t *cycle, void *conf)
#endif
-#if (HAVE_DEVPOLL)
+#if (NGX_HAVE_DEVPOLL)
connections = DEFAULT_CONNECTIONS;
module = &ngx_devpoll_module;
#endif
-#if (HAVE_KQUEUE)
+#if (NGX_HAVE_KQUEUE)
connections = DEFAULT_CONNECTIONS;
module = &ngx_kqueue_module;
#endif
-#if (HAVE_SELECT)
+#if (NGX_HAVE_SELECT)
if (module == NULL) {
diff --git a/src/event/ngx_event.h b/src/event/ngx_event.h
index 44728e381..d156a6393 100644
--- a/src/event/ngx_event.h
+++ b/src/event/ngx_event.h
@@ -15,7 +15,7 @@
#define NGX_INVALID_INDEX 0xd0d0d0d0
-#if (HAVE_IOCP)
+#if (NGX_HAVE_IOCP)
typedef struct {
WSAOVERLAPPED ovlp;
@@ -86,7 +86,7 @@ struct ngx_event_s {
unsigned accept_context_updated:1;
#endif
-#if (HAVE_KQUEUE)
+#if (NGX_HAVE_KQUEUE)
unsigned kq_vnode:1;
/* the pending errno reported by kqueue */
@@ -107,7 +107,7 @@ struct ngx_event_s {
* accept: 1 if accept many, 0 otherwise
*/
-#if (HAVE_KQUEUE) || (HAVE_IOCP)
+#if (NGX_HAVE_KQUEUE) || (NGX_HAVE_IOCP)
int available;
#else
unsigned available:1;
@@ -117,9 +117,9 @@ struct ngx_event_s {
ngx_event_handler_pt event_handler;
-#if (HAVE_AIO)
+#if (NGX_HAVE_AIO)
-#if (HAVE_IOCP)
+#if (NGX_HAVE_IOCP)
ngx_event_ovlp_t ovlp;
#else
struct aiocb aiocb;
@@ -154,12 +154,12 @@ struct ngx_event_s {
unsigned posted_timedout:1;
unsigned posted_eof:1;
-#if (HAVE_KQUEUE)
+#if (NGX_HAVE_KQUEUE)
/* the pending errno reported by kqueue */
int posted_errno;
#endif
-#if (HAVE_KQUEUE) || (HAVE_IOCP)
+#if (NGX_HAVE_KQUEUE) || (NGX_HAVE_IOCP)
int posted_available;
#else
unsigned posted_available:1;
@@ -272,7 +272,7 @@ extern ngx_event_actions_t ngx_event_actions;
/*
* Need to add socket or handle only once - i/o completion port.
- * It also requires HAVE_AIO and NGX_USE_AIO_EVENT to be set.
+ * It also requires NGX_HAVE_AIO and NGX_USE_AIO_EVENT to be set.
*/
#define NGX_USE_IOCP_EVENT 0x00000200
@@ -296,7 +296,7 @@ extern ngx_event_actions_t ngx_event_actions;
#define NGX_VNODE_EVENT 0
-#if (HAVE_KQUEUE)
+#if (NGX_HAVE_KQUEUE)
#define NGX_READ_EVENT EVFILT_READ
#define NGX_WRITE_EVENT EVFILT_WRITE
@@ -325,7 +325,7 @@ extern ngx_event_actions_t ngx_event_actions;
#define NGX_DISABLE_EVENT EV_DISABLE
-#elif (HAVE_DEVPOLL)
+#elif (NGX_HAVE_DEVPOLL)
#define NGX_READ_EVENT POLLIN
#define NGX_WRITE_EVENT POLLOUT
@@ -334,7 +334,7 @@ extern ngx_event_actions_t ngx_event_actions;
#define NGX_ONESHOT_EVENT 1
-#elif (HAVE_EPOLL)
+#elif (NGX_HAVE_EPOLL)
#define NGX_READ_EVENT EPOLLIN
#define NGX_WRITE_EVENT EPOLLOUT
@@ -347,7 +347,7 @@ extern ngx_event_actions_t ngx_event_actions;
#endif
-#elif (HAVE_POLL)
+#elif (NGX_HAVE_POLL)
#define NGX_READ_EVENT POLLIN
#define NGX_WRITE_EVENT POLLOUT
@@ -364,10 +364,10 @@ extern ngx_event_actions_t ngx_event_actions;
#define NGX_LEVEL_EVENT 0
#define NGX_ONESHOT_EVENT 1
-#endif /* HAVE_KQUEUE */
+#endif /* NGX_HAVE_KQUEUE */
-#if (HAVE_IOCP)
+#if (NGX_HAVE_IOCP)
#define NGX_IOCP_ACCEPT 0
#define NGX_IOCP_IO 1
#define NGX_IOCP_CONNECT 2
diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c
index b5c5b7256..294f3b4ce 100644
--- a/src/event/ngx_event_openssl.c
+++ b/src/event/ngx_event_openssl.c
@@ -9,7 +9,7 @@
#include <ngx_event.h>
-static ngx_int_t ngx_ssl_write(ngx_connection_t *c, u_char *data, size_t size);
+static ssize_t ngx_ssl_write(ngx_connection_t *c, u_char *data, size_t size);
ngx_int_t ngx_ssl_init(ngx_log_t *log)
@@ -58,7 +58,7 @@ ngx_int_t ngx_ssl_create_session(ngx_ssl_ctx_t *ssl_ctx, ngx_connection_t *c,
}
-ngx_int_t ngx_ssl_recv(ngx_connection_t *c, u_char *buf, size_t size)
+ssize_t ngx_ssl_recv(ngx_connection_t *c, u_char *buf, size_t size)
{
int n, sslerr;
ngx_err_t err;
@@ -239,7 +239,7 @@ ngx_chain_t *ngx_ssl_send_chain(ngx_connection_t *c, ngx_chain_t *in,
}
-static ngx_int_t ngx_ssl_write(ngx_connection_t *c, u_char *data, size_t size)
+static ssize_t ngx_ssl_write(ngx_connection_t *c, u_char *data, size_t size)
{
int n, sslerr;
ngx_err_t err;
diff --git a/src/event/ngx_event_openssl.h b/src/event/ngx_event_openssl.h
index 69d8d1288..dbdb5f7b3 100644
--- a/src/event/ngx_event_openssl.h
+++ b/src/event/ngx_event_openssl.h
@@ -41,7 +41,7 @@ ngx_int_t ngx_ssl_create_session(ngx_ssl_ctx_t *ctx, ngx_connection_t *c,
#define ngx_ssl_handshake(c) NGX_OK
-ngx_int_t ngx_ssl_recv(ngx_connection_t *c, u_char *buf, size_t size);
+ssize_t ngx_ssl_recv(ngx_connection_t *c, u_char *buf, size_t size);
ngx_chain_t *ngx_ssl_send_chain(ngx_connection_t *c, ngx_chain_t *in,
off_t limit);
ngx_int_t ngx_ssl_shutdown(ngx_connection_t *c);
diff --git a/src/event/ngx_event_pipe.c b/src/event/ngx_event_pipe.c
index a2edc7129..3ca8a0cf3 100644
--- a/src/event/ngx_event_pipe.c
+++ b/src/event/ngx_event_pipe.c
@@ -132,7 +132,7 @@ ngx_int_t ngx_event_pipe_read_upstream(ngx_event_pipe_t *p)
p->upstream_eof = 1;
p->read = 1;
-#if (HAVE_KQUEUE)
+#if (NGX_HAVE_KQUEUE)
if (p->upstream->read->kq_errno) {
p->upstream->read->error = 1;
p->upstream_error = 1;
diff --git a/src/event/ngx_event_posted.c b/src/event/ngx_event_posted.c
index aed07faa3..a99a434cb 100644
--- a/src/event/ngx_event_posted.c
+++ b/src/event/ngx_event_posted.c
@@ -120,7 +120,7 @@ ngx_int_t ngx_event_thread_process_posted(ngx_cycle_t *cycle)
ev->ready |= ev->posted_ready;
ev->timedout |= ev->posted_timedout;
ev->pending_eof |= ev->posted_eof;
-#if (HAVE_KQUEUE)
+#if (NGX_HAVE_KQUEUE)
ev->kq_errno |= ev->posted_errno;
#endif
if (ev->posted_available) {
@@ -130,7 +130,7 @@ ngx_int_t ngx_event_thread_process_posted(ngx_cycle_t *cycle)
ev->posted_ready = 0;
ev->posted_timedout = 0;
ev->posted_eof = 0;
-#if (HAVE_KQUEUE)
+#if (NGX_HAVE_KQUEUE)
ev->posted_errno = 0;
#endif
ev->posted_available = 0;