nginx-0.0.1-2003-02-06-20:21:13 import
diff --git a/src/core/nginx.c b/src/core/nginx.c
index 3133f87..895d136 100644
--- a/src/core/nginx.c
+++ b/src/core/nginx.c
@@ -27,6 +27,7 @@
 
 /* STUB */
 int ngx_max_conn = 512;
+u_int  ngx_sendfile_flags;
 
 ngx_server_t  ngx_server;
 /* */
@@ -53,11 +54,16 @@
     /* */
 
 #if (WIN32)
-    ngx_init_sockets(&ngx_log);
-#else
-    ngx_set_signals(&ngx_log);
-#endif
 
+    if (ngx_init_sockets(&ngx_log) == NGX_ERROR) {
+        exit(1);
+    }
+
+#else
+
+    ngx_set_signals(&ngx_log);
+
+#endif
 
     ngx_init_array(ngx_listening_sockets, ngx_pool, 10, sizeof(ngx_listen_t),
                    1);
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c
index 8497e2d..1d78f72 100644
--- a/src/core/ngx_conf_file.c
+++ b/src/core/ngx_conf_file.c
@@ -62,7 +62,9 @@
 
         /* NGX_OK, NGX_ERROR, NGX_CONF_FILE_DONE, NGX_CONF_BLOCK_DONE */
 
+#if 0
 ngx_log_debug(cf->log, "token %d" _ rc);
+#endif
 
         if (rc == NGX_ERROR) {
             return NGX_CONF_ERROR;
@@ -101,7 +103,9 @@
                     && ngx_strcmp(name->data, cmd->name.data) == 0)
                 {
 
+#if 0
 ngx_log_debug(cf->log, "command '%s'" _ cmd->name.data);
+#endif
 
                     if (!(cmd->type & NGX_CONF_ANY)
                         && !(cmd->type & argument_number[cf->args->nelts - 1]))
@@ -126,7 +130,9 @@
 
                     rv = cmd->set(cf, cmd, conf);
 
+#if 0
 ngx_log_debug(cf->log, "rv: %d" _ rv);
+#endif
 
                     if (rv == NGX_CONF_OK) {
                         found = 1;
@@ -192,7 +198,9 @@
     h = cf->conf_file->hunk;
     start = h->pos.mem;
 
+#if 0
 ngx_log_debug(cf->log, "TOKEN START");
+#endif
 
     for ( ;; ) {
 
@@ -360,7 +368,9 @@
                 *dst = '\0';
                 word->len = len;
 
+#if 0
 ngx_log_debug(cf->log, "FOUND %d:'%s'" _ word->len _ word->data);
+#endif
 
                 if (ch == ';' || ch == '{') {
                     return NGX_OK;
diff --git a/src/core/ngx_conf_file.h b/src/core/ngx_conf_file.h
index de85a74..9573ab9 100644
--- a/src/core/ngx_conf_file.h
+++ b/src/core/ngx_conf_file.h
@@ -83,6 +83,12 @@
     }
 
 
+#define ngx_conf_size_merge(conf, prev, default)                             \
+    if (conf == (size_t) NGX_CONF_UNSET) {                                   \
+        conf = (prev == (size_t) NGX_CONF_UNSET) ? default : prev;           \
+    }
+
+
 
 char *ngx_conf_parse(ngx_conf_t *cf, ngx_str_t *filename);
 
@@ -95,4 +101,4 @@
 extern ngx_module_t *ngx_modules[];
 
 
-#endif _NGX_HTTP_CONF_FILE_H_INCLUDED_
+#endif /* _NGX_HTTP_CONF_FILE_H_INCLUDED_ */
diff --git a/src/core/ngx_config.h b/src/core/ngx_config.h
index a90a1dc..1a97b09 100644
--- a/src/core/ngx_config.h
+++ b/src/core/ngx_config.h
@@ -94,22 +94,24 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
+
 #ifndef HAVE_POLL
 #define HAVE_POLL  1
 #include <poll.h>
-/*
-#ifndef INFTIM
-#define INFTIM    -1
-#endif
-*/
 #endif
 
 
 #if (HAVE_DEVPOLL)
+#include <sys/ioctl.h>
 #include <sys/devpoll.h>        /* Solaris, HP/UX */
 #endif
 
 
+#if (HAVE_AIO)
+#include <aio.h>
+#endif
+
+
 #define ngx_inline   inline
 
 
diff --git a/src/core/ngx_connection.h b/src/core/ngx_connection.h
index 93f6cbd..6401587 100644
--- a/src/core/ngx_connection.h
+++ b/src/core/ngx_connection.h
@@ -38,6 +38,11 @@
     int               family;
     struct sockaddr  *sockaddr;
     socklen_t         socklen;
+#if (HAVE_IOCP)
+    struct sockaddr  *local_sockaddr;
+    socklen_t         local_socklen;
+    void             *listening;
+#endif
     int               addr;
     int               addr_text_max_len;
     ngx_str_t         addr_text;
diff --git a/src/core/ngx_file.h b/src/core/ngx_file.h
index c1bb3c2..d0151ad 100644
--- a/src/core/ngx_file.h
+++ b/src/core/ngx_file.h
@@ -21,4 +21,4 @@
 };
 
 
-#endif _NGX_FILE_H_INCLUDED_
+#endif /* _NGX_FILE_H_INCLUDED_ */
diff --git a/src/core/ngx_listen.h b/src/core/ngx_listen.h
index 61f08fd..ea614ef 100644
--- a/src/core/ngx_listen.h
+++ b/src/core/ngx_listen.h
@@ -36,6 +36,7 @@
 
     unsigned          bound:1;       /* already bound */
     unsigned          inherited:1;   /* inherited from previous process */
+    unsigned          nonblocking_accept:1;
     unsigned          nonblocking:1;
 #if 0
     unsigned          overlapped:1;  /* Winsock2 overlapped */
diff --git a/src/core/ngx_sendfile.h b/src/core/ngx_sendfile.h
index a80750b..3c211f5 100644
--- a/src/core/ngx_sendfile.h
+++ b/src/core/ngx_sendfile.h
@@ -7,14 +7,17 @@
 #include <ngx_files.h>
 #include <ngx_socket.h>
 #include <ngx_log.h>
+#include <ngx_connection.h>
 #include <ngx_sendv.h>
 
-int ngx_sendfile(ngx_socket_t s,
+int ngx_sendfile(ngx_connection_t *c,
                  ngx_iovec_t *headers, int hdr_cnt,
                  ngx_fd_t fd, off_t offset, size_t nbytes,
                  ngx_iovec_t *trailers, int trl_cnt,
-                 off_t *sent,
-                 ngx_log_t *log);
+                 off_t *sent, u_int flags);
+
+
+extern u_int ngx_sendfile_flags;
 
 
 #endif /* _NGX_SENDFILE_H_INCLUDED_ */