]> git.kaiwu.me - nginx.git/commitdiff
r1577, r1582 merge:
authorIgor Sysoev <igor@sysoev.ru>
Wed, 12 Dec 2007 20:38:44 +0000 (20:38 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Wed, 12 Dec 2007 20:38:44 +0000 (20:38 +0000)
Cygwin support

auto/headers
src/os/unix/ngx_posix_config.h
src/os/unix/ngx_process_cycle.c

index 29eec60ab119da9fb101b340c62a114358a7e5f7..d41d95a753f4f01f68d1a18dfacb01196c28cd71 100644 (file)
@@ -6,3 +6,5 @@ ngx_include="unistd.h";    . auto/include
 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
index f796576549d8ef04f2eef16bde3d0bdf096450cb..49c3c4d6c0f5e768a84d205292bfe0074bcbb862 100644 (file)
 #endif
 
 
+#ifdef __CYGWIN__
+#define timezonevar             /* timezone is variable */
+#define NGX_BROKEN_SCM_RIGHTS   1
+#endif
+
+
 #include <sys/types.h>
 #include <sys/time.h>
 #if (NGX_HAVE_UNISTD_H)
 #include <limits.h>             /* IOV_MAX */
 #endif
 
+#if (NGX_HAVE_MALLOC_H)
+#include <malloc.h>             /* memalign() */
+#endif
+
+#if (NGX_HAVE_CRYPT_H)
+#include <crypt.h>
+#endif
+
+
 #ifndef IOV_MAX
 #define IOV_MAX   16
 #endif
index 4705f395179e4cde9ac95fd66c213db421354d5d..631597ef45f19f2e850746b695d59ff98181bb1f 100644 (file)
@@ -409,6 +409,12 @@ ngx_signal_worker_processes(ngx_cycle_t *cycle, int signo)
     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 *cycle, int signo)
         ch.command = 0;
     }
 
+#endif
+
     ch.fd = -1;