]> git.kaiwu.me - nginx.git/commitdiff
Merging r4155, r4219, r4220, r4230:
authorIgor Sysoev <igor@sysoev.ru>
Tue, 1 Nov 2011 13:56:26 +0000 (13:56 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 1 Nov 2011 13:56:26 +0000 (13:56 +0000)
Windows related fixes:

*) Fixed segmentation fault with empty config on Windows.
   See here for report:
   http://mailman.nginx.org/pipermail/nginx-ru/2011-September/043288.html

*) Recent SDKs allow to build IPV6 only for Windows XP or above.

*) Fixing conflict with SDK off_t definition.

*) Fix of building by Microsoft Visual C++ 10 compiler.

auto/cc/name
src/http/ngx_http.c
src/os/win32/ngx_win32_config.h

index d197fc59b17a82d16a7e294e5dbae636ec14b1dc..8788bc6627da53f69a841785cc62fb52f05a3cd6 100644 (file)
@@ -25,6 +25,13 @@ fi
 
 if [ "$CC" = cl ]; then
     if `$NGX_WINE $CC -v 2>&1 \
+        | grep '^Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16' \
+        >/dev/null 2>&1`; then
+
+        NGX_CC_NAME=msvc10
+        echo " + using Microsoft Visual C++ 10 compiler"
+
+    else if `$NGX_WINE $CC -v 2>&1 \
         | grep '^Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14' \
         >/dev/null 2>&1`; then
 
@@ -43,6 +50,7 @@ if [ "$CC" = cl ]; then
         echo " + using Microsoft Visual C++ compiler"
     fi
     fi
+    fi
 
 else
 if [ "$CC" = wcl386 ]; then
index 4f0b79def3785b6c93fd3672b0c9a2ec714c1077..1eb22f81e1c066b4a53e79f25d3ff13b27902735 100644 (file)
@@ -1747,10 +1747,12 @@ ngx_http_add_listening(ngx_conf_t *cf, ngx_http_conf_addr_t *addr)
 
 #if (NGX_WIN32)
     {
-    ngx_iocp_conf_t  *iocpcf;
+    ngx_iocp_conf_t  *iocpcf = NULL;
 
-    iocpcf = ngx_event_get_conf(cf->cycle->conf_ctx, ngx_iocp_module);
-    if (iocpcf->acceptex_read) {
+    if (ngx_get_conf(cf->cycle->conf_ctx, ngx_events_module)) {
+        iocpcf = ngx_event_get_conf(cf->cycle->conf_ctx, ngx_iocp_module);
+    }
+    if (iocpcf && iocpcf->acceptex_read) {
         ls->post_accept_buffer_size = cscf->client_header_buffer_size;
     }
     }
index f098eae36e0b059a93d8c0446b8553017c3b1796..8ffe95c3128f5c3f84e209bb132ffb0d5e81918e 100644 (file)
@@ -9,7 +9,7 @@
 
 
 #define WIN32         0x0400
-#define _WIN32_WINNT  0x0500
+#define _WIN32_WINNT  0x0501
 
 
 #define STRICT
@@ -126,8 +126,11 @@ typedef unsigned __int64    uint64_t;
 typedef int                 intptr_t;
 typedef u_int               uintptr_t;
 
-typedef int                 ssize_t;
+/* Windows defines off_t as long, which is 32-bit */
 typedef __int64             off_t;
+#define _OFF_T_DEFINED
+
+typedef int                 ssize_t;
 typedef uint32_t            in_addr_t;
 typedef u_short             in_port_t;
 typedef int                 sig_atomic_t;