From d09f7a1e9aa5816493e2fef93074383d95140c13 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 15 Jun 2004 17:47:16 +0000 Subject: nginx-0.0.7-2004-06-15-21:47:16 import --- src/event/modules/ngx_select_module.c | 2 ++ src/event/ngx_event.c | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'src/event') diff --git a/src/event/modules/ngx_select_module.c b/src/event/modules/ngx_select_module.c index 39fb3f76f..93b3cf3e7 100644 --- a/src/event/modules/ngx_select_module.c +++ b/src/event/modules/ngx_select_module.c @@ -596,12 +596,14 @@ static char *ngx_select_init_conf(ngx_cycle_t *cycle, void *conf) /* disable warning: the default FD_SETSIZE is 1024U in FreeBSD 5.x */ +#if !(WIN32) if ((unsigned) ecf->connections > FD_SETSIZE) { ngx_log_error(NGX_LOG_EMERG, cycle->log, 0, "the maximum number of files " "supported by select() is " ngx_value(FD_SETSIZE)); return NGX_CONF_ERROR; } +#endif return NGX_CONF_OK; } diff --git a/src/event/ngx_event.c b/src/event/ngx_event.c index a1153a6dd..d669182a0 100644 --- a/src/event/ngx_event.c +++ b/src/event/ngx_event.c @@ -658,8 +658,12 @@ static char *ngx_event_init_conf(ngx_cycle_t *cycle, void *conf) #elif (HAVE_SELECT) +#if (WIN32) + ngx_conf_init_unsigned_value(ecf->connections, DEFAULT_CONNECTIONS); +#else ngx_conf_init_unsigned_value(ecf->connections, FD_SETSIZE < DEFAULT_CONNECTIONS ? FD_SETSIZE : DEFAULT_CONNECTIONS); +#endif ngx_conf_init_value(ecf->use, ngx_select_module.ctx_index); ngx_conf_init_ptr_value(ecf->name, ngx_select_module_ctx.name->data); -- cgit