# HG changeset patch # User Igor Sysoev # Date 1197491924 0 # Node ID 2ab8bb66d3d7a15d5fbe2b5fe069a8d05f778cf4 # Parent 5b24b2decde850097592839e497d886e6b7fe062 r1577, r1582 merge: Cygwin support diff --git a/auto/headers b/auto/headers --- a/auto/headers +++ b/auto/headers @@ -6,3 +6,5 @@ ngx_include="unistd.h"; . auto/includ ngx_include="inttypes.h"; . auto/include ngx_include="limits.h"; . auto/include ngx_include="sys/filio.h"; . auto/include +ngx_include="crypt.h"; . auto/include +ngx_include="malloc.h"; . auto/include diff --git a/src/os/unix/ngx_posix_config.h b/src/os/unix/ngx_posix_config.h --- a/src/os/unix/ngx_posix_config.h +++ b/src/os/unix/ngx_posix_config.h @@ -19,6 +19,12 @@ #endif +#ifdef __CYGWIN__ +#define timezonevar /* timezone is variable */ +#define NGX_BROKEN_SCM_RIGHTS 1 +#endif + + #include #include #if (NGX_HAVE_UNISTD_H) @@ -64,6 +70,15 @@ #include /* IOV_MAX */ #endif +#if (NGX_HAVE_MALLOC_H) +#include /* memalign() */ +#endif + +#if (NGX_HAVE_CRYPT_H) +#include +#endif + + #ifndef IOV_MAX #define IOV_MAX 16 #endif diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c --- a/src/os/unix/ngx_process_cycle.c +++ b/src/os/unix/ngx_process_cycle.c @@ -409,6 +409,12 @@ ngx_signal_worker_processes(ngx_cycle_t ngx_err_t err; ngx_channel_t ch; +#if (NGX_BROKEN_SCM_RIGHTS) + + ch.command = 0; + +#else + switch (signo) { case ngx_signal_value(NGX_SHUTDOWN_SIGNAL): @@ -427,6 +433,8 @@ ngx_signal_worker_processes(ngx_cycle_t ch.command = 0; } +#endif + ch.fd = -1;