nginx-0.1.25-RELEASE import

    *) Bugfix: nginx did run on Linux parisc.

    *) Feature: nginx now does not start under FreeBSD if the sysctl
       kern.ipc.somaxconn value is too big.

    *) Bugfix: if a request was internally redirected by the
       ngx_http_index_module module to the ngx_http_proxy_module or
       ngx_http_fastcgi_module modules, then the index file was not closed
       after request completion.

    *) Feature: the "proxy_pass" can be used in location with regular
       expression.

    *) Feature: the ngx_http_rewrite_filter_module module supports the
       condition like "if ($HTTP_USER_AGENT ~ MSIE)".

    *) Bugfix: nginx started too slow if the large number of addresses and
       text values were used in the "geo" directive.

    *) Change: a variable name must be declared as "$name" in the "geo"
       directive. The previous variant without "$" is still supported, but
       will be removed soon.

    *) Feature: the "%{VARIABLE}v" logging parameter.

    *) Feature: the "set $name value" directive.

    *) Bugfix: gcc 4.0 compatibility.

    *) Feature: the --with-openssl-opt=OPTIONS autoconfiguration directive.
diff --git a/src/os/win32/ngx_alloc.c b/src/os/win32/ngx_alloc.c
index e73aa32..a3bca02 100644
--- a/src/os/win32/ngx_alloc.c
+++ b/src/os/win32/ngx_alloc.c
@@ -15,7 +15,8 @@
 {
     void  *p;
 
-    if (!(p = malloc(size))) {
+    p = malloc(size);
+    if (p == NULL) {
         ngx_log_error(NGX_LOG_EMERG, log, ngx_errno,
                       "malloc() %uz bytes failed", size);
     }
diff --git a/src/os/win32/ngx_files.c b/src/os/win32/ngx_files.c
index ce0fdc9..bea580b 100644
--- a/src/os/win32/ngx_files.c
+++ b/src/os/win32/ngx_files.c
@@ -179,7 +179,8 @@
     ngx_uint_t          collision;
     ngx_atomic_uint_t   num;
 
-    if (!(name = ngx_palloc(pool, to->len + 1 + 10 + 1 + sizeof("DELETE")))) {
+    name = ngx_palloc(pool, to->len + 1 + 10 + 1 + sizeof("DELETE"));
+    if (name == NULL) {
         return NGX_ERROR;
     }
 
@@ -301,6 +302,20 @@
 }
 
 
+ngx_int_t
+ngx_de_info(u_char *name, ngx_dir_t *dir)
+{
+    return NGX_OK;
+}
+
+
+ngx_int_t
+ngx_de_link_info(u_char *name, ngx_dir_t *dir)
+{
+    return NGX_OK;
+}
+
+
 ngx_int_t ngx_file_append_mode(ngx_fd_t fd)
 {
 #if 0
diff --git a/src/os/win32/ngx_files.h b/src/os/win32/ngx_files.h
index 48b54b3..a917431 100644
--- a/src/os/win32/ngx_files.h
+++ b/src/os/win32/ngx_files.h
@@ -132,10 +132,13 @@
 
 #define ngx_de_name(dir)            ((u_char *) (dir)->fd.cFileName)
 #define ngx_de_namelen(dir)         ngx_strlen((dir)->fd.cFileName)
-#define ngx_de_info(name, dir)      NGX_OK
+
+ngx_int_t ngx_de_info(u_char *name, ngx_dir_t *dir);
 #define ngx_de_info_n               "dummy()"
-#define ngx_de_link_info(name, dir) NGX_OK
+
+ngx_int_t ngx_de_link_info(u_char *name, ngx_dir_t *dir);
 #define ngx_de_link_info_n          "dummy()"
+
 #define ngx_de_is_dir(dir)                                                    \
     ((dir)->fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
 #define ngx_de_is_file(dir)                                                   \
diff --git a/src/os/win32/ngx_process_cycle.c b/src/os/win32/ngx_process_cycle.c
index e0635a5..2251ff2 100644
--- a/src/os/win32/ngx_process_cycle.c
+++ b/src/os/win32/ngx_process_cycle.c
@@ -206,7 +206,7 @@
 
     cycle = (ngx_cycle_t *) ngx_cycle;
 
-    for ( ;; ) {
+    while (!ngx_quit) {
         ngx_log_debug0(NGX_LOG_DEBUG_EVENT, cycle->log, 0, "worker cycle");
 
         ngx_process_events(cycle);
diff --git a/src/os/win32/ngx_socket.c b/src/os/win32/ngx_socket.c
index fc77433..7590c33 100644
--- a/src/os/win32/ngx_socket.c
+++ b/src/os/win32/ngx_socket.c
@@ -8,7 +8,8 @@
 #include <ngx_core.h>
 
 
-int ngx_nonblocking(ngx_socket_t s)
+int
+ngx_nonblocking(ngx_socket_t s)
 {
     unsigned long  nb = 1;
 
@@ -16,9 +17,17 @@
 }
 
 
-int ngx_blocking(ngx_socket_t s)
+int
+ngx_blocking(ngx_socket_t s)
 {
     unsigned long  nb = 0;
 
     return ioctlsocket(s, FIONBIO, &nb);
 }
+
+
+int
+ngx_tcp_push(ngx_socket_t s)
+{
+    return 0;
+}
diff --git a/src/os/win32/ngx_socket.h b/src/os/win32/ngx_socket.h
index 8875288..95ecbe8 100644
--- a/src/os/win32/ngx_socket.h
+++ b/src/os/win32/ngx_socket.h
@@ -98,10 +98,7 @@
 extern LPFN_TRANSMITFILE          transmitfile;
 
 
-static ngx_inline int ngx_tcp_push(ngx_socket_t s) {
-     return 0;
-}
-
+int ngx_tcp_push(ngx_socket_t s);
 #define ngx_tcp_push_n        "tcp_push()"
 
 
diff --git a/src/os/win32/ngx_thread.c b/src/os/win32/ngx_thread.c
index 8fae0e3..0703ac7 100644
--- a/src/os/win32/ngx_thread.c
+++ b/src/os/win32/ngx_thread.c
@@ -66,3 +66,19 @@
 {
     return (ngx_mutex_t *) 1;
 }
+
+
+/* STUB */
+
+ngx_int_t
+ngx_mutex_lock(ngx_mutex_t *m) {
+    return NGX_OK;
+}
+
+
+ngx_int_t
+ngx_mutex_trylock(ngx_mutex_t *m) {
+    return NGX_OK;
+}
+
+/**/
diff --git a/src/os/win32/ngx_thread.h b/src/os/win32/ngx_thread.h
index 5b3c4da..b55dcca 100644
--- a/src/os/win32/ngx_thread.h
+++ b/src/os/win32/ngx_thread.h
@@ -22,8 +22,8 @@
 } ngx_mutex_t;
 
 
-ngx_err_t ngx_create_thread(ngx_tid_t *tid, void* (*func)(void *arg), void *arg,
-                            ngx_log_t *log);
+ngx_err_t ngx_create_thread(ngx_tid_t *tid, void* (*func)(void *arg),
+    void *arg, ngx_log_t *log);
 ngx_int_t ngx_init_threads(int n, size_t size, ngx_cycle_t *cycle);
 
 ngx_err_t ngx_thread_key_create(ngx_tls_key_t *key);
@@ -41,14 +41,15 @@
 
 ngx_mutex_t *ngx_mutex_init(ngx_log_t *log, ngx_uint_t flags);
 
+ngx_int_t ngx_mutex_lock(ngx_mutex_t *m);
+ngx_int_t ngx_mutex_trylock(ngx_mutex_t *m);
+
 
 /* STUB */
 #define NGX_MUTEX_LIGHT             0
 
-#define ngx_mutex_lock(m)           NGX_OK
-#define ngx_mutex_trylock(m)        NGX_OK
 #define ngx_mutex_unlock(m)
-/* */
+/**/
 
 
 extern ngx_int_t  ngx_threads_n;
diff --git a/src/os/win32/ngx_win32_config.h b/src/os/win32/ngx_win32_config.h
index 36af239..02d4db5 100644
--- a/src/os/win32/ngx_win32_config.h
+++ b/src/os/win32/ngx_win32_config.h
@@ -37,7 +37,6 @@
 
 #pragma warning(default:4201)
 
-
 /* disable some "-W4" level warnings */
 
 /* 'type cast': from function pointer to data pointer */
@@ -49,14 +48,13 @@
 /* unreferenced formal parameter */
 #pragma warning(disable:4100)
 
-/* conditional expression is constant */
+/* FD_SET() and FD_CLR(): conditional expression is constant */
 #pragma warning(disable:4127)
 
-/* unreachable code */
-#pragma warning(disable:4702)
-
+#if 0
 /* assignment within conditional expression */
 #pragma warning(disable:4706)
+#endif
 
 /* function 'ngx_handle_write_event' not inlined */
 #pragma warning(disable:4710)
@@ -66,9 +64,6 @@
 
 #ifdef __WATCOMC__
 
-/* unreachable code */
-#pragma disable_message(201)
-
 /* symbol 'ngx_rbtree_min' has been defined, but not referenced */
 #pragma disable_message(202)
 
@@ -80,25 +75,16 @@
 /* the end of the precompiled headers */
 #pragma hdrstop
 
-/*
- * 'fd' is assigned a value that is never used in function ngx_event_init_conf
- */
-#pragma warn -8004
-
-/* condition is always false */
-#pragma warn -8008
-
 /* functions containing (for|while|some if) are not expanded inline */
 #pragma warn -8027
 
 /* unreferenced formal parameter */
 #pragma warn -8057
 
+#if 0
 /* assignment within conditional expression */
 #pragma warn -8060
-
-/* unreachable code */
-#pragma warn -8066
+#endif
 
 #endif
 
diff --git a/src/os/win32/ngx_wsarecv_chain.c b/src/os/win32/ngx_wsarecv_chain.c
index 2e2f7cc..c22a08d 100644
--- a/src/os/win32/ngx_wsarecv_chain.c
+++ b/src/os/win32/ngx_wsarecv_chain.c
@@ -9,16 +9,21 @@
 #include <ngx_event.h>
 
 
-ssize_t ngx_wsarecv_chain(ngx_connection_t *c, ngx_chain_t *chain)
+#define NGX_WSABUFS  8 
+
+
+ssize_t
+ngx_wsarecv_chain(ngx_connection_t *c, ngx_chain_t *chain)
 {
     int           rc;
     u_char       *prev;
     u_long        bytes, flags;
     size_t        size;
-    WSABUF       *wsabuf;
     ngx_err_t     err;
-    ngx_array_t   io;
+    ngx_array_t   vec;
     ngx_event_t  *rev;
+    LPWSABUF      wsabuf;
+    WSABUF        wsabufs[NGX_WSABUFS];
 
     prev = NULL;
     wsabuf = NULL;
@@ -26,7 +31,11 @@
     size = 0;
     bytes = 0;
 
-    ngx_init_array(io, c->pool, 10, sizeof(WSABUF), NGX_ERROR);
+    vec.elts = wsabufs;
+    vec.nelts = 0;
+    vec.size = sizeof(WSABUF);
+    vec.nalloc = NGX_WSABUFS; 
+    vec.pool = c->pool;
 
     /* coalesce the neighbouring bufs */
 
@@ -35,7 +44,11 @@
             wsabuf->len += chain->buf->end - chain->buf->last;
 
         } else {
-            ngx_test_null(wsabuf, ngx_push_array(&io), NGX_ERROR);
+            wsabuf = ngx_array_push(&vec);
+            if (wsabuf == NULL) {
+                return NGX_ERROR;
+            }
+
             wsabuf->buf = (char *) chain->buf->last;
             wsabuf->len = chain->buf->end - chain->buf->last;
         }
@@ -46,10 +59,10 @@
     }
 
     ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                   "WSARecv: %d:%d", io.nelts, wsabuf->len);
+                   "WSARecv: %d:%d", vec.nelts, wsabuf->len);
 
 
-    rc = WSARecv(c->fd, io.elts, io.nelts, &bytes, &flags, NULL, NULL);
+    rc = WSARecv(c->fd, vec.elts, vec.nelts, &bytes, &flags, NULL, NULL);
 
     rev = c->read;
 
diff --git a/src/os/win32/ngx_wsasend_chain.c b/src/os/win32/ngx_wsasend_chain.c
index d5b1334..bc3b015 100644
--- a/src/os/win32/ngx_wsasend_chain.c
+++ b/src/os/win32/ngx_wsasend_chain.c
@@ -12,8 +12,8 @@
 #define NGX_WSABUFS  8
 
 
-ngx_chain_t *ngx_wsasend_chain(ngx_connection_t *c, ngx_chain_t *in,
-                               off_t limit)
+ngx_chain_t *
+ngx_wsasend_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
 {
     int           rc;
     u_char       *prev;
@@ -22,9 +22,9 @@
     ngx_err_t     err;
     ngx_event_t  *wev;
     ngx_array_t   vec;
+    ngx_chain_t  *cl;
     LPWSABUF      wsabuf;
     WSABUF        wsabufs[NGX_WSABUFS];
-    ngx_chain_t  *cl;
 
     wev = c->write;
 
@@ -78,7 +78,8 @@
                 wsabuf->len += cl->buf->last - cl->buf->pos;
 
             } else {
-                if (!(wsabuf = ngx_array_push(&vec))) {
+                wsabuf = ngx_array_push(&vec);
+                if (wsabuf == NULL) {
                     return NGX_CHAIN_ERROR;
                 }
 
@@ -154,18 +155,18 @@
 }
 
 
-ngx_chain_t *ngx_overlapped_wsasend_chain(ngx_connection_t *c, ngx_chain_t *in,
-                                          off_t limit)
+ngx_chain_t *
+ngx_overlapped_wsasend_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
 {
     int               rc;
     u_char           *prev;
     u_long            size, send, sent;
-    LPWSABUF          wsabuf;
     ngx_err_t         err;
     ngx_event_t      *wev;
     ngx_array_t       vec;
     ngx_chain_t      *cl;
     LPWSAOVERLAPPED   ovlp;
+    LPWSABUF          wsabuf;
     WSABUF            wsabufs[NGX_WSABUFS];
 
     wev = c->write;
@@ -222,7 +223,8 @@
                 wsabuf->len += cl->buf->last - cl->buf->pos;
 
             } else {
-                if (!(wsabuf = ngx_array_push(&vec))) {
+                wsabuf = ngx_array_push(&vec);
+                if (wsabuf == NULL) {
                     return NGX_CHAIN_ERROR;
                 }