nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
diff --git a/src/core/nginx.c b/src/core/nginx.c index e9046fd..920b601 100644 --- a/src/core/nginx.c +++ b/src/core/nginx.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/core/nginx.h b/src/core/nginx.h index 769a9bf..c53ad7a 100644 --- a/src/core/nginx.h +++ b/src/core/nginx.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGINX_H_INCLUDED_ #define _NGINX_H_INCLUDED_
diff --git a/src/core/ngx_array.c b/src/core/ngx_array.c index 8ecb83f..0bc25a9 100644 --- a/src/core/ngx_array.c +++ b/src/core/ngx_array.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/core/ngx_array.h b/src/core/ngx_array.h index a6a1c8a..6a2fe03 100644 --- a/src/core/ngx_array.h +++ b/src/core/ngx_array.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_ARRAY_H_INCLUDED_ #define _NGX_ARRAY_H_INCLUDED_
diff --git a/src/core/ngx_buf.c b/src/core/ngx_buf.c index 16398a6..ca64783 100644 --- a/src/core/ngx_buf.c +++ b/src/core/ngx_buf.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/core/ngx_buf.h b/src/core/ngx_buf.h index 1927ed4..fa2a544 100644 --- a/src/core/ngx_buf.h +++ b/src/core/ngx_buf.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_BUF_H_INCLUDED_ #define _NGX_BUF_H_INCLUDED_ @@ -6,46 +12,9 @@ #include <ngx_core.h> -#if 0 -/* the buf type */ +typedef void * ngx_buf_tag_t; -/* the buf's content is in memory */ -#define NGX_HUNK_IN_MEMORY 0x0001 -/* the buf's content can be changed */ -#define NGX_HUNK_TEMP 0x0002 -/* the buf's content is in cache and can not be changed */ -#define NGX_HUNK_MEMORY 0x0004 -#define NGX_HUNK_MMAP 0x0008 - -/* the buf's content is recycled */ -#define NGX_HUNK_RECYCLED 0x0010 - -/* the buf's content is in a file */ -#define NGX_HUNK_FILE 0x0020 - -#define NGX_HUNK_STORAGE (NGX_HUNK_IN_MEMORY \ - |NGX_HUNK_TEMP|NGX_HUNK_MEMORY|NGX_HUNK_MMAP \ - |NGX_HUNK_RECYCLED|NGX_HUNK_FILE) - -/* the buf flags */ - -/* in thread state flush means to write the buf completely before return */ -/* in event state flush means to start to write the buf */ -#define NGX_HUNK_FLUSH 0x0100 - -/* the last buf */ -#define NGX_HUNK_LAST 0x0200 - - -#define NGX_HUNK_PREREAD 0x2000 -#define NGX_HUNK_LAST_SHADOW 0x4000 -#define NGX_HUNK_TEMP_FILE 0x8000 -#endif - - -typedef void * ngx_buf_tag_t; - -typedef struct ngx_buf_s ngx_buf_t; +typedef struct ngx_buf_s ngx_buf_t; struct ngx_buf_s { u_char *pos; @@ -61,17 +30,18 @@ ngx_buf_t *shadow; - /* the buf's content can be changed */ + /* the buf's content could be changed */ unsigned temporary:1; /* * the buf's content is in a memory cache or in a read only memory - * and can not be changed + * and must not be changed */ unsigned memory:1; - /* the buf's content is mmap()ed and can not be changed */ + /* the buf's content is mmap()ed and must not be changed */ unsigned mmap:1; + unsigned recycled:1; unsigned in_file:1; unsigned flush:1;
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c index e0fec6f..99c5df1 100644 --- a/src/core/ngx_conf_file.c +++ b/src/core/ngx_conf_file.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/core/ngx_conf_file.h b/src/core/ngx_conf_file.h index d2c7613..567c86c 100644 --- a/src/core/ngx_conf_file.h +++ b/src/core/ngx_conf_file.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_HTTP_CONF_FILE_H_INCLUDED_ #define _NGX_HTTP_CONF_FILE_H_INCLUDED_
diff --git a/src/core/ngx_config.h b/src/core/ngx_config.h index 63a42ef..f23176d 100644 --- a/src/core/ngx_config.h +++ b/src/core/ngx_config.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_CONFIG_H_INCLUDED_ #define _NGX_CONFIG_H_INCLUDED_ @@ -116,5 +122,10 @@ #define INET_ADDRSTRLEN 16 #endif +#define NGX_MAXHOSTNAMELEN 64 +/* +#define NGX_MAXHOSTNAMELEN MAXHOSTNAMELEN +*/ + #endif /* _NGX_CONFIG_H_INCLUDED_ */
diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c index 5fc99b3..5b66374 100644 --- a/src/core/ngx_connection.c +++ b/src/core/ngx_connection.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/core/ngx_connection.h b/src/core/ngx_connection.h index fbfe67f..a925084 100644 --- a/src/core/ngx_connection.h +++ b/src/core/ngx_connection.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_CONNECTION_H_INCLUDED_ #define _NGX_CONNECTION_H_INCLUDED_
diff --git a/src/core/ngx_core.h b/src/core/ngx_core.h index 0a12fb2..671956e 100644 --- a/src/core/ngx_core.h +++ b/src/core/ngx_core.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_CORE_H_INCLUDED_ #define _NGX_CORE_H_INCLUDED_ @@ -70,11 +76,4 @@ #define CRLF "\x0d\x0a" - -#define NGX_MAXHOSTNAMELEN 64 -/* -#define NGX_MAXHOSTNAMELEN MAXHOSTNAMELEN -*/ - - #endif /* _NGX_CORE_H_INCLUDED_ */
diff --git a/src/core/ngx_crc.h b/src/core/ngx_crc.h index c6234c3..208001d 100644 --- a/src/core/ngx_crc.h +++ b/src/core/ngx_crc.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_CRC_H_INCLUDED_ #define _NGX_CRC_H_INCLUDED_ @@ -9,9 +15,10 @@ uint32_t sum; for (sum = 0; len; len--) { + /* * gcc 2.95.2 x86 and icc 7.1.006 compile that operator - * into the single rol opcode. + * into the single "rol" opcode. * msvc 6.0sp2 compiles it into four opcodes. */ sum = sum >> 1 | sum << 31;
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c index e5b30b1..86528ba 100644 --- a/src/core/ngx_cycle.c +++ b/src/core/ngx_cycle.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/core/ngx_cycle.h b/src/core/ngx_cycle.h index 1b24dd3..f1e88b1 100644 --- a/src/core/ngx_cycle.h +++ b/src/core/ngx_cycle.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_CYCLE_H_INCLUDED_ #define _NGX_CYCLE_H_INCLUDED_
diff --git a/src/core/ngx_file.c b/src/core/ngx_file.c index ef92a0a..7ae77de 100644 --- a/src/core/ngx_file.c +++ b/src/core/ngx_file.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/core/ngx_file.h b/src/core/ngx_file.h index db46d54..d6ca67d 100644 --- a/src/core/ngx_file.h +++ b/src/core/ngx_file.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_FILE_H_INCLUDED_ #define _NGX_FILE_H_INCLUDED_
diff --git a/src/core/ngx_garbage_collector.c b/src/core/ngx_garbage_collector.c index 924f11a..ea2529a 100644 --- a/src/core/ngx_garbage_collector.c +++ b/src/core/ngx_garbage_collector.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_garbage_collector.h>
diff --git a/src/core/ngx_garbage_collector.h b/src/core/ngx_garbage_collector.h index 5bc8471..b445944 100644 --- a/src/core/ngx_garbage_collector.h +++ b/src/core/ngx_garbage_collector.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_GARBAGE_COLLECTOR_H_INCLUDED_ #define _NGX_GARBAGE_COLLECTOR_H_INCLUDED_
diff --git a/src/core/ngx_inet.c b/src/core/ngx_inet.c index 94d0c72..5000ee0 100644 --- a/src/core/ngx_inet.c +++ b/src/core/ngx_inet.c
@@ -1,4 +1,10 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/core/ngx_inet.h b/src/core/ngx_inet.h index dbdf6f0..5e30c9e 100644 --- a/src/core/ngx_inet.h +++ b/src/core/ngx_inet.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_INET_H_INCLUDED_ #define _NGX_INET_H_INCLUDED_
diff --git a/src/core/ngx_list.c b/src/core/ngx_list.c index 885f8f5..85e3b64 100644 --- a/src/core/ngx_list.c +++ b/src/core/ngx_list.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/core/ngx_list.h b/src/core/ngx_list.h index f43f235..b65eff3 100644 --- a/src/core/ngx_list.h +++ b/src/core/ngx_list.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_LIST_H_INCLUDED_ #define _NGX_LIST_H_INCLUDED_
diff --git a/src/core/ngx_log.c b/src/core/ngx_log.c index e542920..b23d8bb 100644 --- a/src/core/ngx_log.c +++ b/src/core/ngx_log.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/core/ngx_log.h b/src/core/ngx_log.h index 45ab6e0..782d28a 100644 --- a/src/core/ngx_log.h +++ b/src/core/ngx_log.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_LOG_H_INCLUDED_ #define _NGX_LOG_H_INCLUDED_ @@ -24,8 +30,8 @@ #define NGX_LOG_DEBUG_IMAP 0x200 /* - * after the adding a new debug level do not forget to update - * debug_levels[] in src/core/ngx_log.c + * do not forget to update debug_levels[] in src/core/ngx_log.c + * after the adding a new debug level */ #define NGX_LOG_DEBUG_FIRST NGX_LOG_DEBUG_CORE @@ -34,50 +40,6 @@ #define NGX_LOG_DEBUG_ALL 0x7ffffff0 -/* - "[%time] [%level] %pid#%tid: %message:(%errno)%errstr, while %action" - " %peer and while processing %context" - - ---- - message = "recv() failed"; - errno = 32; - action = "reading request headers from client"; - peer = "192.168.1.1"; - context = "URL /" - - "[2002/08/20 12:00:00] [error] 412#3: recv() failed (32: Broken pipe)" - " while reading request headers from client 192.168.1.1" - " and while processing URL /" - - ---- - message = "recv() failed"; - errno = 32; - ngx_http_proxy_error_context_t: - action = "reading headers from server %s for client %s and " - "while processing %s" - backend = "127.0.0.1"; - peer = "192.168.1.1"; - context = "URL /" - - "[2002/08/20 12:00:00] [error] 412#3: recv() failed (32: Broken pipe)" - " while reading headers from backend 127.0.0.1" - " for client 192.168.1.1 and while processing URL /" - - ---- - "[alert] 412#3: ngx_alloc: malloc() 102400 bytes failed (12: Cannot " - "allocate memory) while reading request headers from client 192.168.1.1" - " and while processing URL /" - - - OLD: - "... while ", action = "reading client request headers" - "... while reading client request headers" - "... while ", action = "reading client request headers" - context: pop3 user account - "... while reading client command for 'john_doe'" -*/ - - typedef size_t (*ngx_log_handler_pt) (void *ctx, char *buf, size_t len); @@ -88,7 +50,7 @@ ngx_log_handler_pt handler; }; -#define MAX_ERROR_STR 2048 +#define MAX_ERROR_STR 2048 /*********************************/
diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c index 8efd369..f40dfd3 100644 --- a/src/core/ngx_output_chain.c +++ b/src/core/ngx_output_chain.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/core/ngx_palloc.c b/src/core/ngx_palloc.c index 132eb70..47f9a86 100644 --- a/src/core/ngx_palloc.c +++ b/src/core/ngx_palloc.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/core/ngx_palloc.h b/src/core/ngx_palloc.h index 1700efb..3a3f244 100644 --- a/src/core/ngx_palloc.h +++ b/src/core/ngx_palloc.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_PALLOC_H_INCLUDED_ #define _NGX_PALLOC_H_INCLUDED_ @@ -8,7 +14,7 @@ /* * NGX_MAX_ALLOC_FROM_POOL should be (ngx_page_size - 1), i.e. 4095 on x86. - * On FreeBSD 5.x it allows to use zero copy send. + * On FreeBSD 5.x it allows to use the zero copy sending. * On Windows NT it decreases a number of locked pages in a kernel. */ #define NGX_MAX_ALLOC_FROM_POOL (ngx_pagesize - 1)
diff --git a/src/core/ngx_parse.c b/src/core/ngx_parse.c index 9d62f70..8edcc5a 100644 --- a/src/core/ngx_parse.c +++ b/src/core/ngx_parse.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/core/ngx_parse.h b/src/core/ngx_parse.h index 630cabe..1423a97 100644 --- a/src/core/ngx_parse.h +++ b/src/core/ngx_parse.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_PARSE_H_INCLUDED_ #define _NGX_PARSE_H_INCLUDED_
diff --git a/src/core/ngx_radix_tree.c b/src/core/ngx_radix_tree.c index 5c7a801..15949e5 100644 --- a/src/core/ngx_radix_tree.c +++ b/src/core/ngx_radix_tree.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/core/ngx_radix_tree.h b/src/core/ngx_radix_tree.h index a5b8c62..2e3319b 100644 --- a/src/core/ngx_radix_tree.h +++ b/src/core/ngx_radix_tree.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_RADIX_TREE_H_INCLUDED_ #define _NGX_RADIX_TREE_H_INCLUDED_
diff --git a/src/core/ngx_rbtree.c b/src/core/ngx_rbtree.c index 083ec10..f3c7ac9 100644 --- a/src/core/ngx_rbtree.c +++ b/src/core/ngx_rbtree.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/core/ngx_rbtree.h b/src/core/ngx_rbtree.h index 04d7622..47ced3e 100644 --- a/src/core/ngx_rbtree.h +++ b/src/core/ngx_rbtree.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_RBTREE_H_INCLUDED_ #define _NGX_RBTREE_H_INCLUDED_
diff --git a/src/core/ngx_regex.c b/src/core/ngx_regex.c index f4d827d..9cae52a 100644 --- a/src/core/ngx_regex.c +++ b/src/core/ngx_regex.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/core/ngx_regex.h b/src/core/ngx_regex.h index 3a99a2f..1d19686 100644 --- a/src/core/ngx_regex.h +++ b/src/core/ngx_regex.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_REGEX_H_INCLUDED_ #define _NGX_REGEX_H_INCLUDED_
diff --git a/src/core/ngx_slab.c b/src/core/ngx_slab.c index dad7265..93d7565 100644 --- a/src/core/ngx_slab.c +++ b/src/core/ngx_slab.c
@@ -1,8 +1,11 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + void *ngx_slab_alloc(ngx_slab_pool_t *pool, size_t size) { - - return NULL; }
diff --git a/src/core/ngx_slab.h b/src/core/ngx_slab.h index 11b249a..0ae7100 100644 --- a/src/core/ngx_slab.h +++ b/src/core/ngx_slab.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_SLAB_H_INCLUDED_ #define _NGX_SLAB_H_INCLUDED_
diff --git a/src/core/ngx_spinlock.c b/src/core/ngx_spinlock.c index 4de23c1..16e6a5c 100644 --- a/src/core/ngx_spinlock.c +++ b/src/core/ngx_spinlock.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/core/ngx_string.c b/src/core/ngx_string.c index 4cdb267..21de891 100644 --- a/src/core/ngx_string.c +++ b/src/core/ngx_string.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/core/ngx_string.h b/src/core/ngx_string.h index 6b22a67..4475425 100644 --- a/src/core/ngx_string.h +++ b/src/core/ngx_string.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_STRING_H_INCLUDED_ #define _NGX_STRING_H_INCLUDED_ @@ -19,48 +25,47 @@ #if (WIN32) #define ngx_strncasecmp(s1, s2, n) \ - strnicmp((const char *) s1, (const char *) s2, n) + strnicmp((const char *) s1, (const char *) s2, n) #define ngx_strcasecmp(s1, s2) \ - stricmp((const char *) s1, (const char *) s2) + stricmp((const char *) s1, (const char *) s2) -#define ngx_snprintf _snprintf -#define ngx_vsnprintf _vsnprintf +#define ngx_snprintf _snprintf +#define ngx_vsnprintf _vsnprintf #else #define ngx_strncasecmp(s1, s2, n) \ - strncasecmp((const char *) s1, (const char *) s2, n) + strncasecmp((const char *) s1, (const char *) s2, n) #define ngx_strcasecmp(s1, s2) \ - strcasecmp((const char *) s1, (const char *) s2) + strcasecmp((const char *) s1, (const char *) s2) -#define ngx_snprintf snprintf -#define ngx_vsnprintf vsnprintf +#define ngx_snprintf snprintf +#define ngx_vsnprintf vsnprintf #endif #define ngx_strncmp(s1, s2, n) \ - strncmp((const char *) s1, (const char *) s2, n) + strncmp((const char *) s1, (const char *) s2, n) /* msvc and icc compile strcmp() to inline loop */ -#define ngx_strcmp(s1, s2) strcmp((const char *) s1, (const char *) s2) +#define ngx_strcmp(s1, s2) strcmp((const char *) s1, (const char *) s2) -#define ngx_strstr(s1, s2) strstr((const char *) s1, (const char *) s2) -#define ngx_strlen(s) strlen((const char *) s) +#define ngx_strstr(s1, s2) strstr((const char *) s1, (const char *) s2) +#define ngx_strlen(s) strlen((const char *) s) /* - * msvc and icc compile memset() to inline "rep stos" - * while ZeroMemory and bzero are calls. - * - * icc can also inline mov's of a zeroed register for small blocks. + * msvc and icc compile memset() to the inline "rep stos" + * while ZeroMemory() and bzero() are the calls. + * icc may also inline several mov's of a zeroed register for small blocks. */ #define ngx_memzero(buf, n) memset(buf, 0, n) -/* msvc and icc compile memcpy() to inline "rep movs" */ +/* msvc and icc compile memcpy() to the inline "rep movs" */ #define ngx_memcpy(dst, src, n) memcpy(dst, src, n) #define ngx_cpymem(dst, src, n) ((u_char *) memcpy(dst, src, n)) + n -/* msvc and icc compile memcmp() to inline loop */ +/* msvc and icc compile memcmp() to the inline loop */ #define ngx_memcmp memcmp u_char *ngx_cpystrn(u_char *dst, u_char *src, size_t n);
diff --git a/src/core/ngx_table.h b/src/core/ngx_table.h index f49ec3a..7315ea3 100644 --- a/src/core/ngx_table.h +++ b/src/core/ngx_table.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_TABLE_H_INCLUDED_ #define _NGX_TABLE_H_INCLUDED_
diff --git a/src/core/ngx_times.c b/src/core/ngx_times.c index b6d5a3f..90ceaae 100644 --- a/src/core/ngx_times.c +++ b/src/core/ngx_times.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> @@ -12,7 +17,7 @@ /* - * In the threaded mode only one thread updates cached time and strings + * In the threaded mode only one thread updates the cached time and strings * and these operations are protected by the mutex. The reading of the cached * time and strings is not protected by the mutex. To avoid the race * conditions for non-atomic values we use the NGX_TIME_SLOTS slots to store @@ -290,6 +295,7 @@ mon += 2; if (yday >= 306) { + /* * there is no "yday" in Win32 SYSTEMTIME *
diff --git a/src/core/ngx_times.h b/src/core/ngx_times.h index 4260405..5384b53 100644 --- a/src/core/ngx_times.h +++ b/src/core/ngx_times.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_TIMES_H_INCLUDED_ #define _NGX_TIMES_H_INCLUDED_
diff --git a/src/event/modules/ngx_aio_module.c b/src/event/modules/ngx_aio_module.c index 7f9a22c..c62e1d5 100644 --- a/src/event/modules/ngx_aio_module.c +++ b/src/event/modules/ngx_aio_module.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/event/modules/ngx_aio_module.h b/src/event/modules/ngx_aio_module.h index 71eb9e4..80bd393 100644 --- a/src/event/modules/ngx_aio_module.h +++ b/src/event/modules/ngx_aio_module.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_AIO_MODULE_H_INCLUDED_ #define _NGX_AIO_MODULE_H_INCLUDED_
diff --git a/src/event/modules/ngx_devpoll_module.c b/src/event/modules/ngx_devpoll_module.c index 3706e01..ee29a72 100644 --- a/src/event/modules/ngx_devpoll_module.c +++ b/src/event/modules/ngx_devpoll_module.c
@@ -1,6 +1,6 @@ /* - * Copyright (C) 2002-2004 Igor Sysoev, http://sysoev.ru/en/ + * Copyright (C) 2002-2004 Igor Sysoev */
diff --git a/src/event/modules/ngx_epoll_module.c b/src/event/modules/ngx_epoll_module.c index ebe2cab..ace4cf3 100644 --- a/src/event/modules/ngx_epoll_module.c +++ b/src/event/modules/ngx_epoll_module.c
@@ -1,6 +1,6 @@ /* - * Copyright (C) 2002-2004 Igor Sysoev, http://sysoev.ru/en/ + * Copyright (C) 2002-2004 Igor Sysoev */
diff --git a/src/event/modules/ngx_iocp_module.c b/src/event/modules/ngx_iocp_module.c index 5273152..5d1d758 100644 --- a/src/event/modules/ngx_iocp_module.c +++ b/src/event/modules/ngx_iocp_module.c
@@ -1,6 +1,6 @@ /* - * Copyright (C) 2002-2004 Igor Sysoev, http://sysoev.ru/en/ + * Copyright (C) 2002-2004 Igor Sysoev */
diff --git a/src/event/modules/ngx_iocp_module.h b/src/event/modules/ngx_iocp_module.h index a1c1efd..b55b489 100644 --- a/src/event/modules/ngx_iocp_module.h +++ b/src/event/modules/ngx_iocp_module.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_IOCP_MODULE_H_INCLUDED_ #define _NGX_IOCP_MODULE_H_INCLUDED_
diff --git a/src/event/modules/ngx_kqueue_module.c b/src/event/modules/ngx_kqueue_module.c index a1d6f59..f8cdcd8 100644 --- a/src/event/modules/ngx_kqueue_module.c +++ b/src/event/modules/ngx_kqueue_module.c
@@ -1,6 +1,6 @@ /* - * Copyright (C) 2002-2004 Igor Sysoev, http://sysoev.ru/en/ + * Copyright (C) 2002-2004 Igor Sysoev */
diff --git a/src/event/modules/ngx_kqueue_module.h b/src/event/modules/ngx_kqueue_module.h index ab1a12b..0ea9862 100644 --- a/src/event/modules/ngx_kqueue_module.h +++ b/src/event/modules/ngx_kqueue_module.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_KQUEUE_MODULE_H_INCLUDED_ #define _NGX_KQUEUE_MODULE_H_INCLUDED_
diff --git a/src/event/modules/ngx_overlapped_module.c b/src/event/modules/ngx_overlapped_module.c deleted file mode 100644 index c3af39d..0000000 --- a/src/event/modules/ngx_overlapped_module.c +++ /dev/null
@@ -1,41 +0,0 @@ - - - event = WSACreateEvent(void); - WSAEventSelect(s, event, FD_ACCEPT); - - -int ngx_overlapped_process_events(ngx_log_t *log) -{ - if (acceptex) - n = SleepEx(timer, 1); - else - n = WSAWaitForMultipleEvents(nevents, events, 0, timer, 1); - - if (n == WSA_WAIT_TIMEOUT) - close some event; - - if (n == WSA_IO_COMPLETION) - again - - /* try it with AcceptEx() on NT to detect connected sockets */ - if (!acceptex) { - WSAEnumNetworkEvents( - sockets[n - WSA_WAIT_EVENT_0], - events[n - WSA_WAIT_EVENT_0], - net_events); - - if (net_events.lNetworkEvents & FD_ACCEPT) { - if (net_events.iErrorCode[FD_ACCEPT_BIT] != 0) - accept error - again - - ngx_event_accept(); OR post AcceptEx(); - } - } -} - -void CALLBACK overlapped_completion_procedure(DWORD error, DWORD nbytes, - LPWSAOVERLAPPED overlapped, DWORD flags) -{ - run event handler -}
diff --git a/src/event/modules/ngx_poll_module.c b/src/event/modules/ngx_poll_module.c index 7c23f5f..eefc3a9 100644 --- a/src/event/modules/ngx_poll_module.c +++ b/src/event/modules/ngx_poll_module.c
@@ -1,6 +1,6 @@ /* - * Copyright (C) 2002-2004 Igor Sysoev, http://sysoev.ru/en/ + * Copyright (C) 2002-2004 Igor Sysoev */
diff --git a/src/event/modules/ngx_rtsig_module.c b/src/event/modules/ngx_rtsig_module.c index 6a83e9c..995ae32 100644 --- a/src/event/modules/ngx_rtsig_module.c +++ b/src/event/modules/ngx_rtsig_module.c
@@ -1,6 +1,6 @@ /* - * Copyright (C) 2002-2004 Igor Sysoev, http://sysoev.ru/en/ + * Copyright (C) 2002-2004 Igor Sysoev */
diff --git a/src/event/modules/ngx_select_module.c b/src/event/modules/ngx_select_module.c index 56b50cd..d441fbe 100644 --- a/src/event/modules/ngx_select_module.c +++ b/src/event/modules/ngx_select_module.c
@@ -1,6 +1,6 @@ /* - * Copyright (C) 2002-2004 Igor Sysoev, http://sysoev.ru/en/ + * Copyright (C) 2002-2004 Igor Sysoev */
diff --git a/src/event/ngx_event.c b/src/event/ngx_event.c index a2e275b..6328bf1 100644 --- a/src/event/ngx_event.c +++ b/src/event/ngx_event.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/event/ngx_event.h b/src/event/ngx_event.h index 9e41fed..b492a65 100644 --- a/src/event/ngx_event.h +++ b/src/event/ngx_event.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_EVENT_H_INCLUDED_ #define _NGX_EVENT_H_INCLUDED_
diff --git a/src/event/ngx_event_accept.c b/src/event/ngx_event_accept.c index 9ab0431..9044c44 100644 --- a/src/event/ngx_event_accept.c +++ b/src/event/ngx_event_accept.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/event/ngx_event_acceptex.c b/src/event/ngx_event_acceptex.c index d638899..0cd74de 100644 --- a/src/event/ngx_event_acceptex.c +++ b/src/event/ngx_event_acceptex.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/event/ngx_event_aio_read.c b/src/event/ngx_event_aio_read.c deleted file mode 100644 index 4561cf4..0000000 --- a/src/event/ngx_event_aio_read.c +++ /dev/null
@@ -1,113 +0,0 @@ - -#include <ngx_config.h> -#include <ngx_core.h> -#include <ngx_errno.h> -#include <ngx_log.h> -#include <ngx_recv.h> -#include <ngx_connection.h> -#include <ngx_event.h> - -#if (HAVE_KQUEUE) -#include <ngx_kqueue_module.h> -#endif - - -/* - The data is ready - 3 syscalls: - aio_read(), aio_error(), aio_return() - The data is not ready - 4 (kqueue) or 5 syscalls: - aio_read(), aio_error(), notifiction, - aio_error(), aio_return() - aio_cancel(), aio_error() -*/ - -ssize_t ngx_event_aio_read(ngx_connection_t *c, char *buf, size_t size) -{ - int rc, first, canceled; - ngx_event_t *ev; - - ev = c->read; - - canceled = 0; - - if (ev->timedout) { - ngx_set_socket_errno(NGX_ETIMEDOUT); - ngx_log_error(NGX_LOG_ERR, ev->log, 0, "aio_read() timed out"); - - rc = aio_cancel(c->fd, &ev->aiocb); - if (rc == -1) { - ngx_log_error(NGX_LOG_CRIT, ev->log, ngx_errno, - "aio_cancel() failed"); - return NGX_ERROR; - } - - ngx_log_debug(ev->log, "aio_cancel: %d" _ rc); - - canceled = 1; - - ev->ready = 1; - } - - first = 0; - - if (!ev->ready) { - ngx_memzero(&ev->aiocb, sizeof(struct aiocb)); - - ev->aiocb.aio_fildes = c->fd; - ev->aiocb.aio_buf = buf; - ev->aiocb.aio_nbytes = size; - -#if (HAVE_KQUEUE) - ev->aiocb.aio_sigevent.sigev_notify_kqueue = kq; - ev->aiocb.aio_sigevent.sigev_notify = SIGEV_KEVENT; - ev->aiocb.aio_sigevent.sigev_value.sigval_ptr = ev; -#endif - - if (aio_read(&ev->aiocb) == -1) { - ngx_log_error(NGX_LOG_CRIT, ev->log, ngx_errno, - "aio_read() failed"); - return NGX_ERROR; - } - - ngx_log_debug(ev->log, "aio_read: OK"); - - ev->active = 1; - first = 1; - } - - ev->ready = 0; - - rc = aio_error(&ev->aiocb); - if (rc == -1) { - ngx_log_error(NGX_LOG_CRIT, ev->log, ngx_errno, "aio_error() failed"); - return NGX_ERROR; - } - - if (rc != 0) { - if (rc == NGX_EINPROGRESS) { - if (!first) { - ngx_log_error(NGX_LOG_CRIT, ev->log, rc, - "aio_read() still in progress"); - } - return NGX_AGAIN; - } - - if (rc == NGX_ECANCELED && canceled) { - return NGX_ERROR; - } - - ngx_log_error(NGX_LOG_CRIT, ev->log, rc, "aio_read() failed"); - return NGX_ERROR; - } - - rc = aio_return(&ev->aiocb); - if (rc == -1) { - ngx_log_error(NGX_LOG_CRIT, ev->log, ngx_errno, "aio_return() failed"); - - return NGX_ERROR; - } - - ngx_log_debug(ev->log, "aio_read: %d" _ rc); - - return rc; -}
diff --git a/src/event/ngx_event_aio_write.c b/src/event/ngx_event_aio_write.c deleted file mode 100644 index 72d35c4..0000000 --- a/src/event/ngx_event_aio_write.c +++ /dev/null
@@ -1,116 +0,0 @@ - -#include <ngx_config.h> -#include <ngx_core.h> -#include <ngx_errno.h> -#include <ngx_log.h> -#include <ngx_recv.h> -#include <ngx_connection.h> -#include <ngx_event.h> - -#if (HAVE_KQUEUE) -#include <ngx_kqueue_module.h> -#endif - - -/* - The data is ready - 3 syscalls: - aio_write(), aio_error(), aio_return() - The data is not ready - 4 (kqueue) or 5 syscalls: - aio_write(), aio_error(), notifiction, - aio_error(), aio_return() - aio_cancel(), aio_error() -*/ - -ssize_t ngx_event_aio_write(ngx_connection_t *c, char *buf, size_t size) -{ - int rc, first, canceled; - ngx_event_t *ev; - - ev = c->write; - - canceled = 0; - -ngx_log_debug(ev->log, "aio: ev->ready: %d" _ ev->ready); -ngx_log_debug(ev->log, "aio: aiocb: %08x" _ &ev->aiocb); - - if (ev->timedout) { - ngx_set_socket_errno(NGX_ETIMEDOUT); - ngx_log_error(NGX_LOG_ERR, ev->log, 0, "aio_write() timed out"); - - rc = aio_cancel(c->fd, &ev->aiocb); - if (rc == -1) { - ngx_log_error(NGX_LOG_CRIT, ev->log, ngx_errno, - "aio_cancel() failed"); - return NGX_ERROR; - } - - ngx_log_debug(ev->log, "aio_cancel: %d" _ rc); - - canceled = 1; - - ev->ready = 1; - } - - first = 0; - - if (!ev->ready) { - ngx_memzero(&ev->aiocb, sizeof(struct aiocb)); - - ev->aiocb.aio_fildes = c->fd; - ev->aiocb.aio_buf = buf; - ev->aiocb.aio_nbytes = size; - -#if (HAVE_KQUEUE) - ev->aiocb.aio_sigevent.sigev_notify_kqueue = kq; - ev->aiocb.aio_sigevent.sigev_notify = SIGEV_KEVENT; - ev->aiocb.aio_sigevent.sigev_value.sigval_ptr = ev; -#endif - - if (aio_write(&ev->aiocb) == -1) { - ngx_log_error(NGX_LOG_CRIT, ev->log, ngx_errno, - "aio_write() failed"); - return NGX_ERROR; - } - - ngx_log_debug(ev->log, "aio_write: OK"); - - ev->active = 1; - first = 1; - } - - ev->ready = 0; - - rc = aio_error(&ev->aiocb); - if (rc == -1) { - ngx_log_error(NGX_LOG_CRIT, ev->log, ngx_errno, "aio_error() failed"); - return NGX_ERROR; - } - - if (rc != 0) { - if (rc == NGX_EINPROGRESS) { - if (!first) { - ngx_log_error(NGX_LOG_CRIT, ev->log, rc, - "aio_write() still in progress"); - } - return NGX_AGAIN; - } - - if (rc == NGX_ECANCELED && canceled) { - return NGX_ERROR; - } - - ngx_log_error(NGX_LOG_CRIT, ev->log, rc, "aio_write() failed"); - return NGX_ERROR; - } - - rc = aio_return(&ev->aiocb); - if (rc == -1) { - ngx_log_error(NGX_LOG_CRIT, ev->log, ngx_errno, "aio_return() failed"); - - return NGX_ERROR; - } - - ngx_log_debug(ev->log, "aio_write: %d" _ rc); - - return rc; -}
diff --git a/src/event/ngx_event_busy_lock.c b/src/event/ngx_event_busy_lock.c index a4db7f9..e3dd41a 100644 --- a/src/event/ngx_event_busy_lock.c +++ b/src/event/ngx_event_busy_lock.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/event/ngx_event_busy_lock.h b/src/event/ngx_event_busy_lock.h index 3862c6f..2f99073 100644 --- a/src/event/ngx_event_busy_lock.h +++ b/src/event/ngx_event_busy_lock.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_EVENT_BUSY_LOCK_H_INCLUDED_ #define _NGX_EVENT_BUSY_LOCK_H_INCLUDED_
diff --git a/src/event/ngx_event_connect.c b/src/event/ngx_event_connect.c index f0fb691..ad21485 100644 --- a/src/event/ngx_event_connect.c +++ b/src/event/ngx_event_connect.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/event/ngx_event_connect.h b/src/event/ngx_event_connect.h index 8a3e17f..5493b62 100644 --- a/src/event/ngx_event_connect.h +++ b/src/event/ngx_event_connect.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_EVENT_CONNECT_H_INCLUDED_ #define _NGX_EVENT_CONNECT_H_INCLUDED_
diff --git a/src/event/ngx_event_connectex.c b/src/event/ngx_event_connectex.c index ed12283..7cb7c31 100644 --- a/src/event/ngx_event_connectex.c +++ b/src/event/ngx_event_connectex.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/event/ngx_event_mutex.c b/src/event/ngx_event_mutex.c index 4f83e48..b77c389 100644 --- a/src/event/ngx_event_mutex.c +++ b/src/event/ngx_event_mutex.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c index 0116787..bbc185f 100644 --- a/src/event/ngx_event_openssl.c +++ b/src/event/ngx_event_openssl.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/event/ngx_event_openssl.h b/src/event/ngx_event_openssl.h index 6c28ba5..5e3faa3 100644 --- a/src/event/ngx_event_openssl.h +++ b/src/event/ngx_event_openssl.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_EVENT_OPENSSL_H_INCLUDED_ #define _NGX_EVENT_OPENSSL_H_INCLUDED_
diff --git a/src/event/ngx_event_pipe.c b/src/event/ngx_event_pipe.c index e324a23..8e2094b 100644 --- a/src/event/ngx_event_pipe.c +++ b/src/event/ngx_event_pipe.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h> @@ -656,8 +661,12 @@ #if 0 b->type &= ~(NGX_HUNK_TEMP|NGX_HUNK_IN_MEMORY|NGX_HUNK_RECYCLED); #endif - b->temporary = 0; - b->recycled = 0; + b->in_file = 0; + b->temp_file = 0; + b->flush = 0; + b->zerocopy_busy = 0; + b->last_shadow = 0; + b->shadow = NULL; b = next; } @@ -669,9 +678,10 @@ |NGX_HUNK_LAST_SHADOW); #endif - b->temporary = 0; - b->recycled = 0; - b->last_shadow = 0; + b->in_file = 0; + b->temp_file = 0; + b->flush = 0; + b->zerocopy_busy = 0; b->shadow = NULL;
diff --git a/src/event/ngx_event_pipe.h b/src/event/ngx_event_pipe.h index e85fc61..f6430f9 100644 --- a/src/event/ngx_event_pipe.h +++ b/src/event/ngx_event_pipe.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_EVENT_PIPE_H_INCLUDED_ #define _NGX_EVENT_PIPE_H_INCLUDED_
diff --git a/src/event/ngx_event_posted.c b/src/event/ngx_event_posted.c index 835c73f..31fa1fe 100644 --- a/src/event/ngx_event_posted.c +++ b/src/event/ngx_event_posted.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/event/ngx_event_posted.h b/src/event/ngx_event_posted.h index 5a30393..055bec3 100644 --- a/src/event/ngx_event_posted.h +++ b/src/event/ngx_event_posted.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_EVENT_POSTED_H_INCLUDED_ #define _NGX_EVENT_POSTED_H_INCLUDED_
diff --git a/src/event/ngx_event_recv.c b/src/event/ngx_event_recv.c deleted file mode 100644 index c083e8f..0000000 --- a/src/event/ngx_event_recv.c +++ /dev/null
@@ -1,147 +0,0 @@ - -#include <ngx_config.h> -#include <ngx_core.h> -#include <ngx_errno.h> -#include <ngx_log.h> -#include <ngx_recv.h> -#include <ngx_connection.h> - -ssize_t ngx_event_recv_core(ngx_connection_t *c, char *buf, size_t size) -{ - ssize_t n; - ngx_err_t err; - ngx_event_t *ev; - - ev = c->read; - -/* DEBUG */ -#if (HAVE_KQUEUE) - if (ngx_event_flags & NGX_HAVE_KQUEUE_EVENT) { - ngx_log_debug(c->log, "ngx_event_recv: eof:%d, avail:%d, err:%d" _ - ev->eof _ ev->available _ ev->error); - } -#endif - -#if (USE_KQUEUE) - - if (ev->eof && ev->available == 0) { - - if (ev->error == 0) { - return 0; - } - - ngx_set_socket_errno(ev->error); - err = ev->error; - n = -1; - - } else { - n = ngx_recv(c->fd, buf, size, 0); - - if (n == -1) { - err = ngx_socket_errno; - } - } - - if (n == -1) { - ev->ready = 0; - - if (err == NGX_ECONNRESET && ev->ignore_econnreset) { - return 0; - } - - if (err == NGX_EAGAIN) { - ngx_log_error(NGX_LOG_INFO, c->log, err, "recv() returned EAGAIN"); - return NGX_AGAIN; - } - - ngx_log_error(NGX_LOG_ERR, c->log, err, "recv() failed"); - return NGX_ERROR; - } - - ev->available -= n; - if (ev->available == 0) { - ev->ready = 0; - } - - return n; - -#elif (HAVE_KQUEUE) - - if ((ngx_event_flags & NGX_HAVE_KQUEUE_EVENT) - && ev->eof && ev->available == 0) { - - if (ev->error == 0) { - return 0; - } - - ngx_set_socket_errno(ev->error); - err = ev->error; - n = -1; - - } else { - n = ngx_recv(c->fd, buf, size, 0); -ngx_log_debug(c->log, "ngx_event_recv: read:%d:%d" _ n _ size); - - if (n == -1) { - err = ngx_socket_errno; - } - } - - if (n == -1) { - ev->ready = 0; - - if (err == NGX_ECONNRESET && ev->ignore_econnreset) { - return 0; - } - - if (err == NGX_EAGAIN) { - ngx_log_error(NGX_LOG_INFO, c->log, err, "recv() returned EAGAIN"); - return NGX_AGAIN; - } - - ngx_log_error(NGX_LOG_ERR, c->log, err, "recv() failed"); - return NGX_ERROR; - } - - if (ngx_event_flags & NGX_HAVE_KQUEUE_EVENT) { - ev->available -= n; - if (ev->available == 0) { - ev->ready = 0; - } - - } else if ((size_t) n < size) { - ev->ready = 0; - } - - return n; - -#else /* not kqueue */ - - n = ngx_recv(c->fd, buf, size, 0); - - if (n == -1) { - err = ngx_socket_errno; - - ev->ready = 0; - - if (err == NGX_ECONNRESET && ev->ignore_econnreset) { - return 0; - } - - if (err == NGX_EAGAIN) { - ngx_log_error(NGX_LOG_INFO, c->log, err, "recv() returned EAGAIN"); - return NGX_AGAIN; - } - - ngx_log_error(NGX_LOG_ERR, c->log, err, "recv() failed"); - return NGX_ERROR; - } - - if ((size_t) n < size) { - ev->ready = 0; - } - - return n; - -#endif -}
diff --git a/src/event/ngx_event_thread.c b/src/event/ngx_event_thread.c deleted file mode 100644 index 527b49c..0000000 --- a/src/event/ngx_event_thread.c +++ /dev/null
@@ -1,129 +0,0 @@ - -volitile int ngx_last_posted_event; - - -typedef struct { - ngx_tid_t tid; - ngx_cv_t cv; -} ngx_thread_data_t; - -static ngx_thread_data_t *threead_data; - - - - - -{ - - err = ngx_thread_cond_wait(ngx_thread_data_cv, ngx_thread_data_mutex); - - tid = ngx_thread_self(); - - for (i = 0; i < thread_data_n; i++) { - if (thread_data[i].tid == tid) { - cv = thread_data[i].cv; - break; - } - } - - if (i == thread_data_n) { - error - return - } - - - for ( ;; ) { - - err = ngx_thread_cond_wait(cv, ngx_posted_events_mutex); - if (err) { - ngx_log_error(NGX_ALERT, log, err, - ngx_thread_cond_wait_n " failed, thread is exiting"); - return; - } - - for ( ;; ) { - ev = NULL; - - for (i = ngx_last_posted_event; i > 0; i--) { - ev = ngx_posted_events[i]; - - if (ev == NULL) { - continue; - } - - err = ngx_thread_mutex_trylock(ev->mutex); - - if (err == 0) { - ngx_posted_events[i] = NULL; - - while (ngx_posted_events[ngx_last_posted_event] == NULL) { - ngx_last_posted_event--; - } - - break; - } - - if (err == NGX_EBUSY) { - ev = NULL; - continue; - } - - ngx_log_error(NGX_ALERT, log, err, - ngx_thread_mutex_unlock_n " failed, - thread is exiting"); - - ngx_worker_thread_error(); - return; - } - - err = ngx_thread_mutex_unlock(ngx_posted_events_mutex); - if (err) { - ngx_log_error(NGX_ALERT, log, err, - ngx_thread_mutex_unlock_n - " failed, thread exiting"); - return; - } - - if (ev == NULL) { - break; - } - - ngx_event_handle_event(ev); - - err = ngx_thread_mutex_unlock(ev->mutex); - if (err) { - ngx_log_error(NGX_ALERT, log, err, - ngx_thread_mutex_unlock_n - " failed, thread exiting"); - - ngx_worker_thread_error(); - return; - } - - err = ngx_thread_mutex_lock(ngx_posted_events_mutex); - if (err) { - ngx_log_error(NGX_ALERT, log, err, - ngx_thread_mutex_lock_n - " failed, thread exiting"); - return; - } - } - - if (restart) { - ngx_log_error(NGX_INFO, log, 0, "thread is exiting"); - return; - } - } -} - -ngx_worker_thread_error() -{ - ngx_err_t err; - - err = ngx_thread_mutex_unlock(ngx_posted_events_mutex); - if (err) { - ngx_log_error(NGX_ALERT, log, err, - ngx_thread_mutex_unlock_n - " failed, thread exiting"); - } -}
diff --git a/src/event/ngx_event_timer.c b/src/event/ngx_event_timer.c index 5b0c871..0fbf66e 100644 --- a/src/event/ngx_event_timer.c +++ b/src/event/ngx_event_timer.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/event/ngx_event_timer.h b/src/event/ngx_event_timer.h index 0ff6405..fb9bc28 100644 --- a/src/event/ngx_event_timer.h +++ b/src/event/ngx_event_timer.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_EVENT_TIMER_H_INCLUDED_ #define _NGX_EVENT_TIMER_H_INCLUDED_
diff --git a/src/event/ngx_event_wsarecv.c b/src/event/ngx_event_wsarecv.c deleted file mode 100644 index b97f97d..0000000 --- a/src/event/ngx_event_wsarecv.c +++ /dev/null
@@ -1,97 +0,0 @@ - -#include <ngx_config.h> - -#include <ngx_core.h> -#include <ngx_errno.h> -#include <ngx_log.h> -#include <ngx_connection.h> -#include <ngx_event.h> - - -ssize_t ngx_event_wsarecv(ngx_connection_t *c, char *buf, size_t size) -{ - int rc; - u_int flags; - size_t bytes; - ngx_err_t err; - WSABUF wsabuf[1]; - ngx_event_t *ev; - LPWSAOVERLAPPED_COMPLETION_ROUTINE handler; - - ev = c->read; - -/* DEBUG */ bytes = 0; - - if (ev->timedout) { - ngx_set_socket_errno(NGX_ETIMEDOUT); - ngx_log_error(NGX_LOG_ERR, ev->log, 0, "WSARecv() timed out"); - - return NGX_ERROR; - } - - if (ev->ready) { - ev->ready = 0; - -#if (HAVE_IOCP) /* iocp */ - - if (ngx_event_flags & NGX_HAVE_IOCP_EVENT) { - if (ev->ovlp.error) { - ngx_log_error(NGX_LOG_ERR, c->log, ev->ovlp.error, - "WSARecv() failed"); - return NGX_ERROR; - } - - return ev->available; - } - -#endif - - if (WSAGetOverlappedResult(c->fd, (LPWSAOVERLAPPED) &ev->ovlp, - &bytes, 0, NULL) == 0) { - err = ngx_socket_errno; - ngx_log_error(NGX_LOG_CRIT, ev->log, err, - "WSARecv() or WSAGetOverlappedResult() failed"); - - return NGX_ERROR; - } - - return bytes; - } - - ngx_memzero(&ev->ovlp, sizeof(WSAOVERLAPPED)); - wsabuf[0].buf = buf; - wsabuf[0].len = size; - flags = 0; - -#if 0 - handler = ev->handler; -#else - handler = NULL; -#endif - - rc = WSARecv(c->fd, wsabuf, 1, &bytes, &flags, - (LPWSAOVERLAPPED) &ev->ovlp, handler); - - ngx_log_debug(ev->log, "WSARecv: %d:%d" _ rc _ bytes); - - if (rc == -1) { - err = ngx_socket_errno; - if (err == WSA_IO_PENDING) { - return NGX_AGAIN; - - } else { - ngx_log_error(NGX_LOG_CRIT, ev->log, err, "WSARecv() failed"); - return NGX_ERROR; - } - } - -#if (HAVE_IOCP) /* iocp */ - - if (ngx_event_flags & NGX_HAVE_IOCP_EVENT) { - return NGX_AGAIN; - } - -#endif - - return bytes; -}
diff --git a/src/http/modules/ngx_http_access_handler.c b/src/http/modules/ngx_http_access_handler.c index 086f2fc..c9ca35f 100644 --- a/src/http/modules/ngx_http_access_handler.c +++ b/src/http/modules/ngx_http_access_handler.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/modules/ngx_http_charset_filter.c b/src/http/modules/ngx_http_charset_filter.c index 662f0b2..6906fdb 100644 --- a/src/http/modules/ngx_http_charset_filter.c +++ b/src/http/modules/ngx_http_charset_filter.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/modules/ngx_http_chunked_filter.c b/src/http/modules/ngx_http_chunked_filter.c index bd4c270..41c7d82 100644 --- a/src/http/modules/ngx_http_chunked_filter.c +++ b/src/http/modules/ngx_http_chunked_filter.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/modules/ngx_http_gzip_filter.c b/src/http/modules/ngx_http_gzip_filter.c index 1a37378..af89a38 100644 --- a/src/http/modules/ngx_http_gzip_filter.c +++ b/src/http/modules/ngx_http_gzip_filter.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/modules/ngx_http_headers_filter.c b/src/http/modules/ngx_http_headers_filter.c index 00c0070..a32233f 100644 --- a/src/http/modules/ngx_http_headers_filter.c +++ b/src/http/modules/ngx_http_headers_filter.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/modules/ngx_http_index_handler.c b/src/http/modules/ngx_http_index_handler.c index 8761943..6d2ec05 100644 --- a/src/http/modules/ngx_http_index_handler.c +++ b/src/http/modules/ngx_http_index_handler.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/modules/ngx_http_not_modified_filter.c b/src/http/modules/ngx_http_not_modified_filter.c index f14a78b..a25e321 100644 --- a/src/http/modules/ngx_http_not_modified_filter.c +++ b/src/http/modules/ngx_http_not_modified_filter.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/modules/ngx_http_range_filter.c b/src/http/modules/ngx_http_range_filter.c index ce13766..aaeccd2 100644 --- a/src/http/modules/ngx_http_range_filter.c +++ b/src/http/modules/ngx_http_range_filter.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/modules/ngx_http_rewrite_handler.c b/src/http/modules/ngx_http_rewrite_handler.c index 6f00db7..ace05c8 100644 --- a/src/http/modules/ngx_http_rewrite_handler.c +++ b/src/http/modules/ngx_http_rewrite_handler.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/modules/ngx_http_ssi_filter.c b/src/http/modules/ngx_http_ssi_filter.c index f4ddb31..a1169f7 100644 --- a/src/http/modules/ngx_http_ssi_filter.c +++ b/src/http/modules/ngx_http_ssi_filter.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/modules/ngx_http_ssl_module.c b/src/http/modules/ngx_http_ssl_module.c index 699bd8f..9cc4df1 100644 --- a/src/http/modules/ngx_http_ssl_module.c +++ b/src/http/modules/ngx_http_ssl_module.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/modules/ngx_http_ssl_module.h b/src/http/modules/ngx_http_ssl_module.h index 2bb1fe1..2024f8d 100644 --- a/src/http/modules/ngx_http_ssl_module.h +++ b/src/http/modules/ngx_http_ssl_module.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_HTTP_SSL_H_INCLUDED_ #define _NGX_HTTP_SSL_H_INCLUDED_
diff --git a/src/http/modules/ngx_http_static_handler.c b/src/http/modules/ngx_http_static_handler.c index 5d27cca..a9ce704 100644 --- a/src/http/modules/ngx_http_static_handler.c +++ b/src/http/modules/ngx_http_static_handler.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/modules/ngx_http_status_handler.c b/src/http/modules/ngx_http_status_handler.c index 6fc1e77..e0f32ce 100644 --- a/src/http/modules/ngx_http_status_handler.c +++ b/src/http/modules/ngx_http_status_handler.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/modules/ngx_http_userid_filter.c b/src/http/modules/ngx_http_userid_filter.c index e37accf..b7e4506 100644 --- a/src/http/modules/ngx_http_userid_filter.c +++ b/src/http/modules/ngx_http_userid_filter.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/modules/proxy/ngx_http_proxy_cache.c b/src/http/modules/proxy/ngx_http_proxy_cache.c index ce2226d..aa93888 100644 --- a/src/http/modules/proxy/ngx_http_proxy_cache.c +++ b/src/http/modules/proxy/ngx_http_proxy_cache.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/modules/proxy/ngx_http_proxy_handler.c b/src/http/modules/proxy/ngx_http_proxy_handler.c index af5e546..a5cfc7c 100644 --- a/src/http/modules/proxy/ngx_http_proxy_handler.c +++ b/src/http/modules/proxy/ngx_http_proxy_handler.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/modules/proxy/ngx_http_proxy_handler.h b/src/http/modules/proxy/ngx_http_proxy_handler.h index 27799bb..e3c936a 100644 --- a/src/http/modules/proxy/ngx_http_proxy_handler.h +++ b/src/http/modules/proxy/ngx_http_proxy_handler.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_HTTP_PROXY_HANDLER_H_INCLUDED_ #define _NGX_HTTP_PROXY_HANDLER_H_INCLUDED_
diff --git a/src/http/modules/proxy/ngx_http_proxy_header.c b/src/http/modules/proxy/ngx_http_proxy_header.c index 9e72f62..e00a47a 100644 --- a/src/http/modules/proxy/ngx_http_proxy_header.c +++ b/src/http/modules/proxy/ngx_http_proxy_header.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/modules/proxy/ngx_http_proxy_parse.c b/src/http/modules/proxy/ngx_http_proxy_parse.c index 5e76dc0..096c9fa 100644 --- a/src/http/modules/proxy/ngx_http_proxy_parse.c +++ b/src/http/modules/proxy/ngx_http_proxy_parse.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/modules/proxy/ngx_http_proxy_upstream.c b/src/http/modules/proxy/ngx_http_proxy_upstream.c index 0cffbce..8070fd8 100644 --- a/src/http/modules/proxy/ngx_http_proxy_upstream.c +++ b/src/http/modules/proxy/ngx_http_proxy_upstream.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c index 9eb0238..01c08bb 100644 --- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/http/ngx_http.h b/src/http/ngx_http.h index 23a95ed..4097c78 100644 --- a/src/http/ngx_http.h +++ b/src/http/ngx_http.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_HTTP_H_INCLUDED_ #define _NGX_HTTP_H_INCLUDED_
diff --git a/src/http/ngx_http_busy_lock.c b/src/http/ngx_http_busy_lock.c index 4bef15a..92a663b 100644 --- a/src/http/ngx_http_busy_lock.c +++ b/src/http/ngx_http_busy_lock.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/ngx_http_busy_lock.h b/src/http/ngx_http_busy_lock.h index dd7ab6f..985eb91 100644 --- a/src/http/ngx_http_busy_lock.h +++ b/src/http/ngx_http_busy_lock.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_HTTP_BUSY_LOCK_H_INCLUDED_ #define _NGX_HTTP_BUSY_LOCK_H_INCLUDED_
diff --git a/src/http/ngx_http_cache.c b/src/http/ngx_http_cache.c index 479caea..3b3257b 100644 --- a/src/http/ngx_http_cache.c +++ b/src/http/ngx_http_cache.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/ngx_http_cache.h b/src/http/ngx_http_cache.h index 25bf678..1804e4c 100644 --- a/src/http/ngx_http_cache.h +++ b/src/http/ngx_http_cache.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_HTTP_CACHE_H_INCLUDED_ #define _NGX_HTTP_CACHE_H_INCLUDED_
diff --git a/src/http/ngx_http_config.h b/src/http/ngx_http_config.h index ee11941..0de9b45 100644 --- a/src/http/ngx_http_config.h +++ b/src/http/ngx_http_config.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_HTTP_CONFIG_H_INCLUDED_ #define _NGX_HTTP_CONFIG_H_INCLUDED_
diff --git a/src/http/ngx_http_copy_filter.c b/src/http/ngx_http_copy_filter.c index 6171530..34c47a7 100644 --- a/src/http/ngx_http_copy_filter.c +++ b/src/http/ngx_http_copy_filter.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index a40548e..194a519 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/http/ngx_http_core_module.h b/src/http/ngx_http_core_module.h index 5e0e344..8d6490b 100644 --- a/src/http/ngx_http_core_module.h +++ b/src/http/ngx_http_core_module.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_HTTP_CORE_H_INCLUDED_ #define _NGX_HTTP_CORE_H_INCLUDED_
diff --git a/src/http/ngx_http_file_cache.c b/src/http/ngx_http_file_cache.c index 10cb3ed..7d920e5 100644 --- a/src/http/ngx_http_file_cache.c +++ b/src/http/ngx_http_file_cache.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/ngx_http_header_filter.c b/src/http/ngx_http_header_filter.c index 2038942..7ece679 100644 --- a/src/http/ngx_http_header_filter.c +++ b/src/http/ngx_http_header_filter.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/ngx_http_log_handler.c b/src/http/ngx_http_log_handler.c index 3de6b10..b9dcd05 100644 --- a/src/http/ngx_http_log_handler.c +++ b/src/http/ngx_http_log_handler.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/ngx_http_log_handler.h b/src/http/ngx_http_log_handler.h index d29e70d..2efa232 100644 --- a/src/http/ngx_http_log_handler.h +++ b/src/http/ngx_http_log_handler.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_HTTP_LOG_HANDLER_H_INCLUDED_ #define _NGX_HTTP_LOG_HANDLER_H_INCLUDED_
diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c index b1fb6c6..3b79c1c 100644 --- a/src/http/ngx_http_parse.c +++ b/src/http/ngx_http_parse.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h> @@ -39,7 +44,7 @@ while (p < b->last && state < sw_done) { ch = *p++; - /* gcc 2.95.2 and vc 6.0 compile this switch as an jump table */ + /* gcc 2.95.2 and msvc 6.0 compile this switch as an jump table */ switch (state) {
diff --git a/src/http/ngx_http_parse_time.c b/src/http/ngx_http_parse_time.c index ea2a224..49eb931 100644 --- a/src/http/ngx_http_parse_time.c +++ b/src/http/ngx_http_parse_time.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_types.h>
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 209ed0c..d27cd8d 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/http/ngx_http_request.h b/src/http/ngx_http_request.h index 79b25b0..ab7e49f 100644 --- a/src/http/ngx_http_request.h +++ b/src/http/ngx_http_request.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_HTTP_REQUEST_H_INCLUDED_ #define _NGX_HTTP_REQUEST_H_INCLUDED_
diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c index 800f549..348f2d1 100644 --- a/src/http/ngx_http_request_body.c +++ b/src/http/ngx_http_request_body.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/http/ngx_http_script.c b/src/http/ngx_http_script.c index 19e582a..57123de 100644 --- a/src/http/ngx_http_script.c +++ b/src/http/ngx_http_script.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/ngx_http_script.h b/src/http/ngx_http_script.h index d3fd5fb..84b99a0 100644 --- a/src/http/ngx_http_script.h +++ b/src/http/ngx_http_script.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_HTTP_SCRIPT_H_INCLUDED_ #define _NGX_HTTP_SCRIPT_H_INCLUDED_
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c index 17efa5a..62ba2b9 100644 --- a/src/http/ngx_http_special_response.c +++ b/src/http/ngx_http_special_response.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h>
diff --git a/src/http/ngx_http_write_filter.c b/src/http/ngx_http_write_filter.c index 2c0989d..c3ec7ac 100644 --- a/src/http/ngx_http_write_filter.c +++ b/src/http/ngx_http_write_filter.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/imap/ngx_imap.c b/src/imap/ngx_imap.c index eb12b67..acc95af 100644 --- a/src/imap/ngx_imap.c +++ b/src/imap/ngx_imap.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/imap/ngx_imap.h b/src/imap/ngx_imap.h index 023f809..2cc81bd 100644 --- a/src/imap/ngx_imap.h +++ b/src/imap/ngx_imap.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_IMAP_H_INCLUDED_ #define _NGX_IMAP_H_INCLUDED_
diff --git a/src/imap/ngx_imap_handler.c b/src/imap/ngx_imap_handler.c index 6c97416..788d840 100644 --- a/src/imap/ngx_imap_handler.c +++ b/src/imap/ngx_imap_handler.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/imap/ngx_imap_parse.c b/src/imap/ngx_imap_parse.c index 8e875f9..bd75750 100644 --- a/src/imap/ngx_imap_parse.c +++ b/src/imap/ngx_imap_parse.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/imap/ngx_imap_proxy.c b/src/imap/ngx_imap_proxy.c index 6c9c859..b42f47d 100644 --- a/src/imap/ngx_imap_proxy.c +++ b/src/imap/ngx_imap_proxy.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/os/unix/ngx_aio.h b/src/os/unix/ngx_aio.h index a10e0b0..66807ef 100644 --- a/src/os/unix/ngx_aio.h +++ b/src/os/unix/ngx_aio.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_AIO_H_INCLUDED_ #define _NGX_AIO_H_INCLUDED_
diff --git a/src/os/unix/ngx_aio_read.c b/src/os/unix/ngx_aio_read.c index 6c0c400..49602f9 100644 --- a/src/os/unix/ngx_aio_read.c +++ b/src/os/unix/ngx_aio_read.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/os/unix/ngx_aio_read_chain.c b/src/os/unix/ngx_aio_read_chain.c index a2a12d2..333c8e4 100644 --- a/src/os/unix/ngx_aio_read_chain.c +++ b/src/os/unix/ngx_aio_read_chain.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/os/unix/ngx_aio_write.c b/src/os/unix/ngx_aio_write.c index 319af12..e16189a 100644 --- a/src/os/unix/ngx_aio_write.c +++ b/src/os/unix/ngx_aio_write.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/os/unix/ngx_aio_write_chain.c b/src/os/unix/ngx_aio_write_chain.c index 2bfa590..294dc12 100644 --- a/src/os/unix/ngx_aio_write_chain.c +++ b/src/os/unix/ngx_aio_write_chain.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/os/unix/ngx_alloc.c b/src/os/unix/ngx_alloc.c index bb3a299..d2e7205 100644 --- a/src/os/unix/ngx_alloc.c +++ b/src/os/unix/ngx_alloc.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/os/unix/ngx_alloc.h b/src/os/unix/ngx_alloc.h index 650f8be..91016e5 100644 --- a/src/os/unix/ngx_alloc.h +++ b/src/os/unix/ngx_alloc.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_ALLOC_H_INCLUDED_ #define _NGX_ALLOC_H_INCLUDED_ @@ -16,7 +22,7 @@ * Linux has memalign() or posix_memalign() * Solaris has memalign() * FreeBSD has not memalign() or posix_memalign() but its malloc() alignes - * allocations bigger than page size at page boundary. + * allocations bigger than page size at the page boundary. */ #if (HAVE_POSIX_MEMALIGN || HAVE_MEMALIGN)
diff --git a/src/os/unix/ngx_atomic.h b/src/os/unix/ngx_atomic.h index c5197e5..6d50985 100644 --- a/src/os/unix/ngx_atomic.h +++ b/src/os/unix/ngx_atomic.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_ATOMIC_H_INCLUDED_ #define _NGX_ATOMIC_H_INCLUDED_
diff --git a/src/os/unix/ngx_channel.c b/src/os/unix/ngx_channel.c index 694b1d8..d2ca1ec 100644 --- a/src/os/unix/ngx_channel.c +++ b/src/os/unix/ngx_channel.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_channel.h>
diff --git a/src/os/unix/ngx_channel.h b/src/os/unix/ngx_channel.h index 2768252..3cb1c55 100644 --- a/src/os/unix/ngx_channel.h +++ b/src/os/unix/ngx_channel.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_CHANNEL_H_INCLUDED_ #define _NGX_CHANNEL_H_INCLUDED_
diff --git a/src/os/unix/ngx_daemon.c b/src/os/unix/ngx_daemon.c index 8bad544..be2a91a 100644 --- a/src/os/unix/ngx_daemon.c +++ b/src/os/unix/ngx_daemon.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/os/unix/ngx_errno.c b/src/os/unix/ngx_errno.c index 3b12528..9b9c6a9 100644 --- a/src/os/unix/ngx_errno.c +++ b/src/os/unix/ngx_errno.c
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/os/unix/ngx_errno.h b/src/os/unix/ngx_errno.h index f539a12..bb86b4b 100644 --- a/src/os/unix/ngx_errno.h +++ b/src/os/unix/ngx_errno.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_ERRNO_H_INCLUDED_ #define _NGX_ERRNO_H_INCLUDED_
diff --git a/src/os/unix/ngx_files.c b/src/os/unix/ngx_files.c index 8b906f0..ae336ae 100644 --- a/src/os/unix/ngx_files.c +++ b/src/os/unix/ngx_files.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/os/unix/ngx_files.h b/src/os/unix/ngx_files.h index 1553144..cb50fce 100644 --- a/src/os/unix/ngx_files.h +++ b/src/os/unix/ngx_files.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_FILES_H_INCLUDED_ #define _NGX_FILES_H_INCLUDED_
diff --git a/src/os/unix/ngx_freebsd.h b/src/os/unix/ngx_freebsd.h index cfafecf..a16b407 100644 --- a/src/os/unix/ngx_freebsd.h +++ b/src/os/unix/ngx_freebsd.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_FREEBSD_H_INCLUDED_ #define _NGX_FREEBSD_H_INCLUDED_
diff --git a/src/os/unix/ngx_freebsd_config.h b/src/os/unix/ngx_freebsd_config.h index d3c41e8..80e70e1 100644 --- a/src/os/unix/ngx_freebsd_config.h +++ b/src/os/unix/ngx_freebsd_config.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_FREEBSD_CONFIG_H_INCLUDED_ #define _NGX_FREEBSD_CONFIG_H_INCLUDED_
diff --git a/src/os/unix/ngx_freebsd_init.c b/src/os/unix/ngx_freebsd_init.c index 3084831..e59a593 100644 --- a/src/os/unix/ngx_freebsd_init.c +++ b/src/os/unix/ngx_freebsd_init.c
@@ -1,22 +1,31 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> -/* FreeBSD 3.4 at least */ +/* FreeBSD 3.0 at least */ char ngx_freebsd_kern_ostype[20]; char ngx_freebsd_kern_osrelease[20]; int ngx_freebsd_kern_osreldate; int ngx_freebsd_hw_ncpu; -int ngx_freebsd_machdep_hlt_logical_cpus; int ngx_freebsd_net_inet_tcp_sendspace; -int ngx_freebsd_sendfile_nbytes_bug; -int ngx_freebsd_use_tcp_nopush; + +/* FreeBSD 4.9 */ +int ngx_freebsd_machdep_hlt_logical_cpus; /* FreeBSD 5.0 */ int ngx_freebsd_kern_ipc_zero_copy_send; +int ngx_freebsd_sendfile_nbytes_bug; +int ngx_freebsd_use_tcp_nopush; + + ngx_os_io_t ngx_os_io = { ngx_unix_recv, ngx_readv_chain,
diff --git a/src/os/unix/ngx_freebsd_rfork_thread.c b/src/os/unix/ngx_freebsd_rfork_thread.c index 5f651c3..361fc8f 100644 --- a/src/os/unix/ngx_freebsd_rfork_thread.c +++ b/src/os/unix/ngx_freebsd_rfork_thread.c
@@ -1,6 +1,6 @@ /* - * Copyright (C) 2002-2004 Igor Sysoev, http://sysoev.ru/en/ + * Copyright (C) 2002-2004 Igor Sysoev */
diff --git a/src/os/unix/ngx_freebsd_rfork_thread.h b/src/os/unix/ngx_freebsd_rfork_thread.h index ce68a4e..f5b8803 100644 --- a/src/os/unix/ngx_freebsd_rfork_thread.h +++ b/src/os/unix/ngx_freebsd_rfork_thread.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_FREEBSD_RFORK_THREAD_H_INCLUDED_ #define _NGX_FREEBSD_RFORK_THREAD_H_INCLUDED_
diff --git a/src/os/unix/ngx_freebsd_sendfile_chain.c b/src/os/unix/ngx_freebsd_sendfile_chain.c index 5a8164f..81aec55 100644 --- a/src/os/unix/ngx_freebsd_sendfile_chain.c +++ b/src/os/unix/ngx_freebsd_sendfile_chain.c
@@ -1,6 +1,6 @@ /* - * Copyright (C) 2002-2004 Igor Sysoev, http://sysoev.ru/en/ + * Copyright (C) 2002-2004 Igor Sysoev */
diff --git a/src/os/unix/ngx_linux.h b/src/os/unix/ngx_linux.h index b3e4155..ba12991 100644 --- a/src/os/unix/ngx_linux.h +++ b/src/os/unix/ngx_linux.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_LINUX_H_INCLUDED_ #define _NGX_LINUX_H_INCLUDED_
diff --git a/src/os/unix/ngx_linux_config.h b/src/os/unix/ngx_linux_config.h index 757a294..b18ec5d 100644 --- a/src/os/unix/ngx_linux_config.h +++ b/src/os/unix/ngx_linux_config.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_LINUX_CONFIG_H_INCLUDED_ #define _NGX_LINUX_CONFIG_H_INCLUDED_
diff --git a/src/os/unix/ngx_linux_init.c b/src/os/unix/ngx_linux_init.c index 7379c6a..847c013 100644 --- a/src/os/unix/ngx_linux_init.c +++ b/src/os/unix/ngx_linux_init.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/os/unix/ngx_linux_sendfile_chain.c b/src/os/unix/ngx_linux_sendfile_chain.c index 3f86712..e8f0cef 100644 --- a/src/os/unix/ngx_linux_sendfile_chain.c +++ b/src/os/unix/ngx_linux_sendfile_chain.c
@@ -1,6 +1,6 @@ /* - * Copyright (C) 2002-2004 Igor Sysoev, http://sysoev.ru/en/ + * Copyright (C) 2002-2004 Igor Sysoev */
diff --git a/src/os/unix/ngx_os.h b/src/os/unix/ngx_os.h index e4e94f2..8fd162d 100644 --- a/src/os/unix/ngx_os.h +++ b/src/os/unix/ngx_os.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_OS_H_INCLUDED_ #define _NGX_OS_H_INCLUDED_
diff --git a/src/os/unix/ngx_posix_config.h b/src/os/unix/ngx_posix_config.h index 53ee9e8..75be90a 100644 --- a/src/os/unix/ngx_posix_config.h +++ b/src/os/unix/ngx_posix_config.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_POSIX_CONFIG_H_INCLUDED_ #define _NGX_POSIX_CONFIG_H_INCLUDED_
diff --git a/src/os/unix/ngx_posix_init.c b/src/os/unix/ngx_posix_init.c index 7498ae6..6a64981 100644 --- a/src/os/unix/ngx_posix_init.c +++ b/src/os/unix/ngx_posix_init.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/os/unix/ngx_process.c b/src/os/unix/ngx_process.c index cd6fd2f..ca6b88c 100644 --- a/src/os/unix/ngx_process.c +++ b/src/os/unix/ngx_process.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/os/unix/ngx_process.h b/src/os/unix/ngx_process.h index 3154906..6e00d44 100644 --- a/src/os/unix/ngx_process.h +++ b/src/os/unix/ngx_process.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_PROCESS_H_INCLUDED_ #define _NGX_PROCESS_H_INCLUDED_
diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c index 941bc42..5614bd2 100644 --- a/src/os/unix/ngx_process_cycle.c +++ b/src/os/unix/ngx_process_cycle.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/os/unix/ngx_process_cycle.h b/src/os/unix/ngx_process_cycle.h index 7c14d3a..4900a34 100644 --- a/src/os/unix/ngx_process_cycle.h +++ b/src/os/unix/ngx_process_cycle.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_PROCESS_CYCLE_H_INCLUDED_ #define _NGX_PROCESS_CYCLE_H_INCLUDED_
diff --git a/src/os/unix/ngx_pthread_thread.c b/src/os/unix/ngx_pthread_thread.c index 6215656..22ef889 100644 --- a/src/os/unix/ngx_pthread_thread.c +++ b/src/os/unix/ngx_pthread_thread.c
@@ -1,6 +1,6 @@ /* - * Copyright (C) 2002-2004 Igor Sysoev, http://sysoev.ru/en/ + * Copyright (C) 2002-2004 Igor Sysoev */
diff --git a/src/os/unix/ngx_readv_chain.c b/src/os/unix/ngx_readv_chain.c index 9458872..b12198f 100644 --- a/src/os/unix/ngx_readv_chain.c +++ b/src/os/unix/ngx_readv_chain.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/os/unix/ngx_recv.c b/src/os/unix/ngx_recv.c index d4d28d7..60dd91d 100644 --- a/src/os/unix/ngx_recv.c +++ b/src/os/unix/ngx_recv.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/os/unix/ngx_send.c b/src/os/unix/ngx_send.c index 2bcbdf9..8616005 100644 --- a/src/os/unix/ngx_send.c +++ b/src/os/unix/ngx_send.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/os/unix/ngx_sendv.c b/src/os/unix/ngx_sendv.c deleted file mode 100644 index 810caae..0000000 --- a/src/os/unix/ngx_sendv.c +++ /dev/null
@@ -1,28 +0,0 @@ - -#include <ngx_core.h> -#include <ngx_types.h> -#include <ngx_errno.h> -#include <ngx_connection.h> -#include <ngx_log.h> -#include <ngx_sendv.h> - -ssize_t ngx_sendv(ngx_connection_t *c, ngx_iovec_t *iovec, int n) -{ - ssize_t rc; - ngx_err_t err; - - rc = writev(c->fd, iovec, n); - - if (rc == -1) { - err = ngx_socket_errno; - if (err == NGX_EAGAIN) { - ngx_log_error(NGX_LOG_INFO, c->log, err, "sendv() eagain"); - return NGX_AGAIN; - } - - ngx_log_error(NGX_LOG_ERR, c->log, err, "sendv() failed"); - return NGX_ERROR; - } - - return rc; -}
diff --git a/src/os/unix/ngx_sendv.h b/src/os/unix/ngx_sendv.h deleted file mode 100644 index 0859a25..0000000 --- a/src/os/unix/ngx_sendv.h +++ /dev/null
@@ -1,15 +0,0 @@ -#ifndef _NGX_SENDV_H_INCLUDED_ -#define _NGX_SENDV_H_INCLUDED_ - - -#include <ngx_types.h> -#include <ngx_connection.h> - -typedef struct iovec ngx_iovec_t; -#define ngx_iov_base iov_base -#define ngx_iov_len iov_len - -ssize_t ngx_sendv(ngx_connection_t *c, ngx_iovec_t *iovec, int n); - - -#endif /* _NGX_SENDV_H_INCLUDED_ */
diff --git a/src/os/unix/ngx_shared.c b/src/os/unix/ngx_shared.c index a19ca53..0d2888d 100644 --- a/src/os/unix/ngx_shared.c +++ b/src/os/unix/ngx_shared.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/os/unix/ngx_shared.h b/src/os/unix/ngx_shared.h index ca077df..40bf7bf 100644 --- a/src/os/unix/ngx_shared.h +++ b/src/os/unix/ngx_shared.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_SHARED_H_INCLUDED_ #define _NGX_SHARED_H_INCLUDED_
diff --git a/src/os/unix/ngx_socket.c b/src/os/unix/ngx_socket.c index da9ccbb..859a980 100644 --- a/src/os/unix/ngx_socket.c +++ b/src/os/unix/ngx_socket.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> @@ -6,7 +11,7 @@ /* * ioctl(FIONBIO) sets a blocking mode with the single syscall * while fcntl(F_SETFL, ~O_NONBLOCK) needs to learn before - * a previous state using fcntl(F_GETFL). + * the previous state using fcntl(F_GETFL). * * ioctl() and fcntl() are syscalls on at least FreeBSD 2.x, Linux 2.2 * and Solaris 7.
diff --git a/src/os/unix/ngx_socket.h b/src/os/unix/ngx_socket.h index 4e2eab4..8664fe6 100644 --- a/src/os/unix/ngx_socket.h +++ b/src/os/unix/ngx_socket.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_SOCKET_H_INCLUDED_ #define _NGX_SOCKET_H_INCLUDED_
diff --git a/src/os/unix/ngx_solaris.h b/src/os/unix/ngx_solaris.h index d66c657..7c076d6 100644 --- a/src/os/unix/ngx_solaris.h +++ b/src/os/unix/ngx_solaris.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_SOLARIS_H_INCLUDED_ #define _NGX_SOLARIS_H_INCLUDED_
diff --git a/src/os/unix/ngx_solaris_config.h b/src/os/unix/ngx_solaris_config.h index 25ec28b..b886746 100644 --- a/src/os/unix/ngx_solaris_config.h +++ b/src/os/unix/ngx_solaris_config.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_SOLARIS_CONFIG_H_INCLUDED_ #define _NGX_SOLARIS_CONFIG_H_INCLUDED_
diff --git a/src/os/unix/ngx_solaris_init.c b/src/os/unix/ngx_solaris_init.c index 25fa14d..7186f1f 100644 --- a/src/os/unix/ngx_solaris_init.c +++ b/src/os/unix/ngx_solaris_init.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/os/unix/ngx_solaris_sendfilev_chain.c b/src/os/unix/ngx_solaris_sendfilev_chain.c index f6dca9c..8b0d3d6 100644 --- a/src/os/unix/ngx_solaris_sendfilev_chain.c +++ b/src/os/unix/ngx_solaris_sendfilev_chain.c
@@ -1,6 +1,6 @@ /* - * Copyright (C) 2002-2004 Igor Sysoev, http://sysoev.ru/en/ + * Copyright (C) 2002-2004 Igor Sysoev */
diff --git a/src/os/unix/ngx_thread.h b/src/os/unix/ngx_thread.h index 69d3c34..f78a7c0 100644 --- a/src/os/unix/ngx_thread.h +++ b/src/os/unix/ngx_thread.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_THREAD_H_INCLUDED_ #define _NGX_THREAD_H_INCLUDED_
diff --git a/src/os/unix/ngx_time.c b/src/os/unix/ngx_time.c index 8647e0e..fd667b0 100644 --- a/src/os/unix/ngx_time.c +++ b/src/os/unix/ngx_time.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/os/unix/ngx_time.h b/src/os/unix/ngx_time.h index 7cf3d01..43c2027 100644 --- a/src/os/unix/ngx_time.h +++ b/src/os/unix/ngx_time.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_TIME_H_INCLUDED_ #define _NGX_TIME_H_INCLUDED_
diff --git a/src/os/unix/ngx_types.h b/src/os/unix/ngx_types.h index bdad25d..a7e21ac 100644 --- a/src/os/unix/ngx_types.h +++ b/src/os/unix/ngx_types.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_TYPES_H_INCLUDED_ #define _NGX_TYPES_H_INCLUDED_
diff --git a/src/os/unix/ngx_unix_init.c b/src/os/unix/ngx_unix_init.c deleted file mode 100644 index ab33979..0000000 --- a/src/os/unix/ngx_unix_init.c +++ /dev/null
@@ -1,34 +0,0 @@ - -#include <ngx_config.h> -#include <ngx_core.h> - - -#if 0 -/* STUB */ -ssize_t ngx_unix_recv(ngx_connection_t *c, char *buf, size_t size); -ngx_chain_t *ngx_writev_chain(ngx_connection_t *c, ngx_chain_t *in); -int ngx_posix_init(ngx_log_t *log); -int ngx_posix_post_conf_init(ngx_log_t *log); -/* */ -#endif - - -ngx_os_io_t ngx_os_io = { - ngx_unix_recv, - ngx_readv_chain, - NULL, - ngx_writev_chain, - NGX_HAVE_ZEROCOPY -}; - - -int ngx_os_init(ngx_log_t *log) -{ - return ngx_posix_init(log); -} - - -int ngx_os_post_conf_init(ngx_log_t *log) -{ - return ngx_posix_post_conf_init(log); -}
diff --git a/src/os/unix/ngx_user.h b/src/os/unix/ngx_user.h index 0aed208..54f6aaa 100644 --- a/src/os/unix/ngx_user.h +++ b/src/os/unix/ngx_user.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_USER_H_INCLUDED_ #define _NGX_USER_H_INCLUDED_
diff --git a/src/os/unix/ngx_writev_chain.c b/src/os/unix/ngx_writev_chain.c index afe49a9..c7b17c2 100644 --- a/src/os/unix/ngx_writev_chain.c +++ b/src/os/unix/ngx_writev_chain.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/os/unix/ngx_x86_mutex.h b/src/os/unix/ngx_x86_mutex.h deleted file mode 100644 index a8ed2ee..0000000 --- a/src/os/unix/ngx_x86_mutex.h +++ /dev/null
@@ -1,30 +0,0 @@ - - -typedef struct { - int lock; -} ngx_mutex_t; - - -static inline int ngx_spin_lock(ngx_mutex_t *m, int count) -{ - int lock; - - __asm__ __volatile(" - -get_lock: - mov $1, %1 - xchg %1, %2 - cmp $0, %1 - jne spin_lock - -spin_lock: - cmp $0, %3 - je failed - - dec %3 - rep nop - cmp $0, %2 - jne spin_lock - - ": "=q" (lock), "m" (m->lock), "q" (count)); -}
diff --git a/src/os/unix/rfork_thread.S b/src/os/unix/rfork_thread.S index 5abb9f8..af79ca2 100644 --- a/src/os/unix/rfork_thread.S +++ b/src/os/unix/rfork_thread.S
@@ -1,4 +1,10 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + + #include <sys/syscall.h> #include <machine/asm.h>
diff --git a/src/os/win32/ngx_alloc.c b/src/os/win32/ngx_alloc.c index 591e61b..8b0cc20 100644 --- a/src/os/win32/ngx_alloc.c +++ b/src/os/win32/ngx_alloc.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/os/win32/ngx_alloc.h b/src/os/win32/ngx_alloc.h index d6ea00a..66798ce 100644 --- a/src/os/win32/ngx_alloc.h +++ b/src/os/win32/ngx_alloc.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_ALLOC_H_INCLUDED_ #define _NGX_ALLOC_H_INCLUDED_
diff --git a/src/os/win32/ngx_atomic.h b/src/os/win32/ngx_atomic.h index 9d75fab..9940261 100644 --- a/src/os/win32/ngx_atomic.h +++ b/src/os/win32/ngx_atomic.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_ATOMIC_H_INCLUDED_ #define _NGX_ATOMIC_H_INCLUDED_
diff --git a/src/os/win32/ngx_errno.c b/src/os/win32/ngx_errno.c index 865fbe3..16bb2a5 100644 --- a/src/os/win32/ngx_errno.c +++ b/src/os/win32/ngx_errno.c
@@ -1,9 +1,14 @@ /* - TODO: - add WSA error messages for NT and 98 - test for English only messages -*/ + * Copyright (C) 2002-2004 Igor Sysoev + */ + + +/* + * TODO: + * add WSA error messages for NT and 98 + * test for English only messages + */ #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/os/win32/ngx_errno.h b/src/os/win32/ngx_errno.h index d55b395..7ee9d56 100644 --- a/src/os/win32/ngx_errno.h +++ b/src/os/win32/ngx_errno.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_ERRNO_H_INCLUDED_ #define _NGX_ERRNO_H_INCLUDED_
diff --git a/src/os/win32/ngx_files.c b/src/os/win32/ngx_files.c index 6ed4ff0..c3be4fb 100644 --- a/src/os/win32/ngx_files.c +++ b/src/os/win32/ngx_files.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/os/win32/ngx_files.h b/src/os/win32/ngx_files.h index c59e79d..0a01ecc 100644 --- a/src/os/win32/ngx_files.h +++ b/src/os/win32/ngx_files.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_FILES_H_INCLUDED_ #define _NGX_FILES_H_INCLUDED_
diff --git a/src/os/win32/ngx_os.h b/src/os/win32/ngx_os.h index c04eaca..3072e3b 100644 --- a/src/os/win32/ngx_os.h +++ b/src/os/win32/ngx_os.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_OS_H_INCLUDED_ #define _NGX_OS_H_INCLUDED_
diff --git a/src/os/win32/ngx_os_thread.c b/src/os/win32/ngx_os_thread.c deleted file mode 100644 index c9d540c..0000000 --- a/src/os/win32/ngx_os_thread.c +++ /dev/null
@@ -1,26 +0,0 @@ - - -#include <ngx_config.h> - -#include <ngx_log.h> -#include <ngx_os_thread.h> - - -int ngx_create_os_thread(ngx_os_tid_t *tid, void *stack, - ngx_thread_start_routine_t func, void *arg, - ngx_log_t log) -{ - ngx_os_tid_t id; - int dummy; /* needed in Win9X only, in NT can be NULL */ - - id = CreateThread(NULL, stack_size, func, arg, 0, &dummy); - - if (id == NULL) { - ngx_log_error(NGX_LOG_ERR, log, err, "CreateThread() failed"); - return NGX_ERROR; - } - - *tid = id; - - return NGX_OK; -}
diff --git a/src/os/win32/ngx_os_thread.h b/src/os/win32/ngx_os_thread.h deleted file mode 100644 index 81eb3b9..0000000 --- a/src/os/win32/ngx_os_thread.h +++ /dev/null
@@ -1,14 +0,0 @@ -#ifndef _NGX_OS_THREAD_H_INCLUDED_ -#define _NGX_OS_THREAD_H_INCLUDED_ - - -#include <ngx_config.h> - - -typedef HANDLE ngx_os_tid_t; -typedef int ngx_tid_t; - -typedef LPTHREAD_START_ROUTINE ngx_thread_start_routine_t - - -#endif /* _NGX_OS_THREAD_H_INCLUDED_ */
diff --git a/src/os/win32/ngx_process.c b/src/os/win32/ngx_process.c index 6d78c1c..23b1697 100644 --- a/src/os/win32/ngx_process.c +++ b/src/os/win32/ngx_process.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/os/win32/ngx_process.h b/src/os/win32/ngx_process.h index 767a88d..ba4603c 100644 --- a/src/os/win32/ngx_process.h +++ b/src/os/win32/ngx_process.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_PROCESS_H_INCLUDED_ #define _NGX_PROCESS_H_INCLUDED_
diff --git a/src/os/win32/ngx_process_cycle.c b/src/os/win32/ngx_process_cycle.c index 93a2cdb..b6d2578 100644 --- a/src/os/win32/ngx_process_cycle.c +++ b/src/os/win32/ngx_process_cycle.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/os/win32/ngx_process_cycle.h b/src/os/win32/ngx_process_cycle.h index 0a91e84..7803686 100644 --- a/src/os/win32/ngx_process_cycle.h +++ b/src/os/win32/ngx_process_cycle.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_PROCESS_CYCLE_H_INCLUDED_ #define _NGX_PROCESS_CYCLE_H_INCLUDED_
diff --git a/src/os/win32/ngx_recv.h b/src/os/win32/ngx_recv.h deleted file mode 100644 index e92832c..0000000 --- a/src/os/win32/ngx_recv.h +++ /dev/null
@@ -1,10 +0,0 @@ -#ifndef _NGX_RECV_H_INCLUDED_ -#define _NGX_RECV_H_INCLUDED_ - - -#include <errno.h> - -#define ngx_recv(fd, buf, size, flags) recv(fd, buf, size, flags) - - -#endif /* _NGX_RECV_H_INCLUDED_ */
diff --git a/src/os/win32/ngx_sendfile.c b/src/os/win32/ngx_sendfile.c deleted file mode 100644 index 2dd779d..0000000 --- a/src/os/win32/ngx_sendfile.c +++ /dev/null
@@ -1,145 +0,0 @@ - -#include <ngx_config.h> -#include <ngx_core.h> -#include <ngx_types.h> -#include <ngx_files.h> -#include <ngx_socket.h> -#include <ngx_errno.h> -#include <ngx_log.h> -#include <ngx_connection.h> -#include <ngx_sendv.h> -#include <ngx_sendfile.h> - -/* - TODO: - various flags - TransmitPackets -*/ - -#if (HAVE_WIN32_TRANSMITFILE) - -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, u_int flags) -{ - int tfrc, rc; - ngx_err_t tf_err, err; - OVERLAPPED olp; - TRANSMIT_FILE_BUFFERS tfb, *ptfb; - -#if 0 - ev = c->write; - - if (ev->timedout) { - ngx_set_socket_errno(NGX_ETIMEDOUT); - ngx_log_error(NGX_LOG_ERR, ev->log, 0, "TransmitFile() timed out"); - - return NGX_ERROR; - } - - if (ev->ready) { - ev->ready = 0; - -#if (HAVE_IOCP) /* iocp */ - - if (ngx_event_flags & NGX_HAVE_IOCP_EVENT) { - if (ev->ovlp.error) { - ngx_log_error(NGX_LOG_ERR, ev->log, 0, "TransmitFile() failed"); - return NGX_ERROR; - } - - return ev->available; - } - } - -#endif - - /* TODO: WSAGetOverlappedResult stuff */ - - } - -#endif - - - tf_err = 0; - err = 0; - - olp.Internal = 0; - olp.InternalHigh = 0; - olp.Offset = (DWORD) offset; - olp.OffsetHigh = (DWORD) (offset >> 32); - olp.hEvent = NULL; - - if (headers || trailers) { - tfb.Head = headers->ngx_iov_base; - tfb.HeadLength = headers->ngx_iov_len; - tfb.Tail = trailers->ngx_iov_base; - tfb.TailLength = trailers->ngx_iov_len; - ptfb = &tfb; - - } else { - ptfb = NULL; - } - -#if 1 - flags = TF_DISCONNECT|TF_REUSE_SOCKET; - tfrc = transmitfile(c->fd, NULL, 0, 0, &olp, NULL, flags); -#else - tfrc = TransmitFile(c->fd, fd, nbytes, 0, &olp, ptfb, flags); -#endif - -#if 0 -#if 1 - tfrc = TransmitFile(c->fd, fd, nbytes, 0, &olp, ptfb, 0); -#else - tfrc = TransmitFile(c->fd, fd, nbytes, 0, NULL, ptfb, 0); -#endif -#endif - - if (tfrc == 0) { - tf_err = ngx_socket_errno; - ngx_log_error(NGX_LOG_NOTICE, c->log, tf_err, - "ngx_sendfile: TransmitFile failed"); - if (tf_err == WSA_IO_PENDING) { - return NGX_AGAIN; - } - } - - /* set sent */ -#if 0 - rc = WSAGetOverlappedResult(c->fd, &olp, (unsigned long *) sent, 0, NULL); -#else - *sent = olp.InternalHigh; - rc = 1; -#endif - - ngx_log_debug(c->log, "TransmitFile: %d, @%I64d %I64d:%d" _ - tfrc _ offset _ *sent _ nbytes); - - if (rc == 0) { - err = ngx_socket_errno; - ngx_log_error(NGX_LOG_ERR, c->log, err, - "ngx_sendfile: WSAGetOverlappedResult failed"); - } - - if (tfrc == 0) { - if (tf_err != NGX_EAGAIN) { - ngx_log_error(NGX_LOG_ERR, c->log, tf_err, - "ngx_sendfile: TransmitFile failed"); - return NGX_ERROR; - } - - ngx_log_error(NGX_LOG_INFO, c->log, tf_err, - "ngx_sendfile: TransmitFile sent only %I64d bytes", - *sent); - } - - if (rc == 0) - return NGX_ERROR; - - return NGX_OK; -} - -#endif
diff --git a/src/os/win32/ngx_sendv.c b/src/os/win32/ngx_sendv.c deleted file mode 100644 index b043629..0000000 --- a/src/os/win32/ngx_sendv.c +++ /dev/null
@@ -1,46 +0,0 @@ - -#include <ngx_config.h> - -#include <ngx_core.h> -#include <ngx_types.h> -#include <ngx_errno.h> -#include <ngx_connection.h> -#include <ngx_log.h> -#include <ngx_sendv.h> - -#include <ngx_string.h> - -ssize_t ngx_sendv(ngx_connection_t *c, ngx_iovec_t *iovec, int n) -{ - int rc; - size_t sent; - ngx_err_t err; - -#if 0 - /* STUB: WSABUF must be 4-byte aligned. Undocumented WSAEINVAL error */ - ngx_iovec_t iov[10]; - ngx_memcpy(iov, iovec, n * sizeof(ngx_iovec_t)); -#endif - - sent = 0; - - ngx_log_debug(c->log, "WSASend: %d, %d, %08x" _ c->fd _ n _ iovec); - - rc = WSASend(c->fd, iovec, n, &sent, 0, NULL, NULL); - - ngx_log_debug(c->log, "WSASend() done"); - - if (rc == SOCKET_ERROR) { - err = ngx_socket_errno; - - if (err == NGX_EAGAIN) { - ngx_log_error(NGX_LOG_INFO, c->log, err, "WSASend() eagain"); - return NGX_AGAIN; - } - - ngx_log_error(NGX_LOG_ERR, c->log, err, "WSASend() failed"); - return NGX_ERROR; - } - - return sent; -}
diff --git a/src/os/win32/ngx_sendv.h b/src/os/win32/ngx_sendv.h deleted file mode 100644 index 0d20310..0000000 --- a/src/os/win32/ngx_sendv.h +++ /dev/null
@@ -1,15 +0,0 @@ -#ifndef _NGX_SENDV_H_INCLUDED_ -#define _NGX_SENDV_H_INCLUDED_ - - -#include <ngx_config.h> -#include <ngx_connection.h> - -typedef WSABUF ngx_iovec_t; -#define ngx_iov_base buf -#define ngx_iov_len len - -ssize_t ngx_sendv(ngx_connection_t *c, ngx_iovec_t *iovec, int n); - - -#endif /* _NGX_SENDV_H_INCLUDED_ */
diff --git a/src/os/win32/ngx_service.c b/src/os/win32/ngx_service.c index 64a54ee..d9c9ad5 100644 --- a/src/os/win32/ngx_service.c +++ b/src/os/win32/ngx_service.c
@@ -1,4 +1,10 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + + #define NGX_SERVICE_CONTROL_SHUTDOWN 128 #define NGX_SERVICE_CONTROL_REOPEN 129
diff --git a/src/os/win32/ngx_shared.h b/src/os/win32/ngx_shared.h index ca077df..40bf7bf 100644 --- a/src/os/win32/ngx_shared.h +++ b/src/os/win32/ngx_shared.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_SHARED_H_INCLUDED_ #define _NGX_SHARED_H_INCLUDED_
diff --git a/src/os/win32/ngx_socket.c b/src/os/win32/ngx_socket.c index e3f6f5c..c397f7b 100644 --- a/src/os/win32/ngx_socket.c +++ b/src/os/win32/ngx_socket.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/os/win32/ngx_socket.h b/src/os/win32/ngx_socket.h index 4401c3d..f1459bc 100644 --- a/src/os/win32/ngx_socket.h +++ b/src/os/win32/ngx_socket.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_SOCKET_H_INCLUDED_ #define _NGX_SOCKET_H_INCLUDED_
diff --git a/src/os/win32/ngx_stat.c b/src/os/win32/ngx_stat.c index 786bc7f..ee63c0c 100644 --- a/src/os/win32/ngx_stat.c +++ b/src/os/win32/ngx_stat.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/os/win32/ngx_thread.h b/src/os/win32/ngx_thread.h index cb282fb..be07db6 100644 --- a/src/os/win32/ngx_thread.h +++ b/src/os/win32/ngx_thread.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_THREAD_H_INCLUDED_ #define _NGX_THREAD_H_INCLUDED_
diff --git a/src/os/win32/ngx_time.c b/src/os/win32/ngx_time.c index 85d1a3b..a4412fc 100644 --- a/src/os/win32/ngx_time.c +++ b/src/os/win32/ngx_time.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> @@ -13,7 +18,7 @@ /* * A file time is a 64-bit value that represents the number * of 100-nanosecond intervals that have elapsed since - * 12:00 A.M. January 1, 1601 (UTC). + * January 1, 1601 12:00 A.M. UTC. * * Between January 1, 1970 (Epoch) and January 1, 1601 there were * 134744 days,
diff --git a/src/os/win32/ngx_time.h b/src/os/win32/ngx_time.h index a51c4f9..fcd494f 100644 --- a/src/os/win32/ngx_time.h +++ b/src/os/win32/ngx_time.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_TIME_H_INCLUDED_ #define _NGX_TIME_H_INCLUDED_
diff --git a/src/os/win32/ngx_types.h b/src/os/win32/ngx_types.h index 7603429..0e12d37 100644 --- a/src/os/win32/ngx_types.h +++ b/src/os/win32/ngx_types.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_TYPES_H_INCLUDED_ #define _NGX_TYPES_H_INCLUDED_
diff --git a/src/os/win32/ngx_user.h b/src/os/win32/ngx_user.h index 480a258..561041b 100644 --- a/src/os/win32/ngx_user.h +++ b/src/os/win32/ngx_user.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_USER_H_INCLUDED_ #define _NGX_USER_H_INCLUDED_
diff --git a/src/os/win32/ngx_win32_config.h b/src/os/win32/ngx_win32_config.h index 6bbe66b..7c66dbc 100644 --- a/src/os/win32/ngx_win32_config.h +++ b/src/os/win32/ngx_win32_config.h
@@ -1,3 +1,9 @@ + +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #ifndef _NGX_WIN32_CONFIG_H_INCLUDED_ #define _NGX_WIN32_CONFIG_H_INCLUDED_ @@ -8,8 +14,8 @@ #define WIN32_LEAN_AND_MEAN /* - * we need to include windows.h explicity before winsock2.h because - * the warning 4201 is enabled in windows.h + * we need to include <windows.h> explicity before <winsock2.h> because + * the warning 4201 is enabled in <windows.h> */ #include <windows.h>
diff --git a/src/os/win32/ngx_win32_init.c b/src/os/win32/ngx_win32_init.c index 7d9d433..61de963 100644 --- a/src/os/win32/ngx_win32_init.c +++ b/src/os/win32/ngx_win32_init.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h>
diff --git a/src/os/win32/ngx_wsarecv.c b/src/os/win32/ngx_wsarecv.c index 1598c6b..2eb04ed 100644 --- a/src/os/win32/ngx_wsarecv.c +++ b/src/os/win32/ngx_wsarecv.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/os/win32/ngx_wsarecv_chain.c b/src/os/win32/ngx_wsarecv_chain.c index e417cff..5b0f18b 100644 --- a/src/os/win32/ngx_wsarecv_chain.c +++ b/src/os/win32/ngx_wsarecv_chain.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>
diff --git a/src/os/win32/ngx_wsasend_chain.c b/src/os/win32/ngx_wsasend_chain.c index eda422e..406d595 100644 --- a/src/os/win32/ngx_wsasend_chain.c +++ b/src/os/win32/ngx_wsasend_chain.c
@@ -1,4 +1,9 @@ +/* + * Copyright (C) 2002-2004 Igor Sysoev + */ + + #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h>