diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2005-03-04 14:06:57 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2005-03-04 14:06:57 +0000 |
| commit | 8184d1b3a72c31e7e6492fc189d687ce85548279 (patch) | |
| tree | 34e977c47f852d35117464b3cd5e82253fb4fa04 /src/os | |
| parent | 7ad4a94eee3e17e073d6e8b638b7bd0a2209d2df (diff) | |
| download | nginx-release-0.1.24.tar.gz nginx-release-0.1.24.tar.bz2 | |
nginx-0.1.24-RELEASE importrelease-0.1.24
*) Feature: the ngx_http_ssi_filter_module supports the QUERY_STRING
and DOCUMENT_URI variables.
*) Bugfix: the ngx_http_autoindex_module may some times return the 404
response for existent directory, if this directory was used in
"alias" directive.
*) Bugfix: the ngx_http_ssi_filter_module ran incorrectly for large
responses.
*) Bugfix: the lack of the "Referer" header line was always accounted
as valid referrer.
Diffstat (limited to 'src/os')
| -rw-r--r-- | src/os/unix/ngx_daemon.c | 2 | ||||
| -rw-r--r-- | src/os/unix/ngx_posix_init.c | 4 | ||||
| -rw-r--r-- | src/os/win32/ngx_files.c | 22 | ||||
| -rw-r--r-- | src/os/win32/ngx_win32_config.h | 35 |
4 files changed, 41 insertions, 22 deletions
diff --git a/src/os/unix/ngx_daemon.c b/src/os/unix/ngx_daemon.c index b9a9b404c..7255b7a7e 100644 --- a/src/os/unix/ngx_daemon.c +++ b/src/os/unix/ngx_daemon.c @@ -8,7 +8,7 @@ #include <ngx_core.h> -int ngx_daemon(ngx_log_t *log) +ngx_int_t ngx_daemon(ngx_log_t *log) { int fd; diff --git a/src/os/unix/ngx_posix_init.c b/src/os/unix/ngx_posix_init.c index abc7f81f7..4fb512665 100644 --- a/src/os/unix/ngx_posix_init.c +++ b/src/os/unix/ngx_posix_init.c @@ -28,7 +28,7 @@ ngx_os_io_t ngx_os_io = { }; -int ngx_os_init(ngx_log_t *log) +ngx_int_t ngx_os_init(ngx_log_t *log) { return ngx_posix_init(log); } @@ -282,7 +282,7 @@ void ngx_signal_handler(int signo) } -int ngx_posix_post_conf_init(ngx_log_t *log) +ngx_int_t ngx_posix_post_conf_init(ngx_log_t *log) { ngx_fd_t pp[2]; diff --git a/src/os/win32/ngx_files.c b/src/os/win32/ngx_files.c index 00d6bbc8e..ce0fdc966 100644 --- a/src/os/win32/ngx_files.c +++ b/src/os/win32/ngx_files.c @@ -174,9 +174,10 @@ ssize_t ngx_write_chain_to_file(ngx_file_t *file, ngx_chain_t *cl, ngx_int_t ngx_win32_rename_file(ngx_str_t *from, ngx_str_t *to, ngx_pool_t *pool) { - int rc, collision; - u_int num; - u_char *name; + u_char *name; + ngx_int_t rc; + ngx_uint_t collision; + ngx_atomic_uint_t num; if (!(name = ngx_palloc(pool, to->len + 1 + 10 + 1 + sizeof("DELETE")))) { return NGX_ERROR; @@ -188,18 +189,19 @@ ngx_int_t ngx_win32_rename_file(ngx_str_t *from, ngx_str_t *to, /* mutex_lock() (per cache or single ?) */ - do { + for ( ;; ) { num = ngx_next_temp_number(collision); - ngx_sprintf(name + to->len, ".%010u.DELETE", num); + ngx_sprintf(name + to->len, ".%0muA.DELETE", num); - if (MoveFile((const char *) to->data, (const char *) name) == 0) { - collision = 1; - ngx_log_error(NGX_LOG_ERR, pool->log, ngx_errno, - "MoveFile() failed"); + if (MoveFile((const char *) to->data, (const char *) name) != 0) { + break; } - } while (collision); + collision = 1; + + ngx_log_error(NGX_LOG_ERR, pool->log, ngx_errno, "MoveFile() failed"); + } if (MoveFile((const char *) from->data, (const char *) to->data) == 0) { rc = NGX_ERROR; diff --git a/src/os/win32/ngx_win32_config.h b/src/os/win32/ngx_win32_config.h index 5bdf91f66..36af23906 100644 --- a/src/os/win32/ngx_win32_config.h +++ b/src/os/win32/ngx_win32_config.h @@ -40,8 +40,10 @@ /* disable some "-W4" level warnings */ -/* disable warnings about some 'type cast */ +/* 'type cast': from function pointer to data pointer */ #pragma warning(disable:4054) + +/* 'type cast': from data pointer to function pointer */ #pragma warning(disable:4055) /* unreferenced formal parameter */ @@ -56,34 +58,48 @@ /* assignment within conditional expression */ #pragma warning(disable:4706) -/* disable "function 'ngx_handle_write_event' not inlined" */ +/* function 'ngx_handle_write_event' not inlined */ #pragma warning(disable:4710) #endif #ifdef __WATCOMC__ + /* unreachable code */ #pragma disable_message(201) -/* disable "Symbol 'ngx_rbtree_min' has been defined, but not referenced" */ + +/* symbol 'ngx_rbtree_min' has been defined, but not referenced */ #pragma disable_message(202) + #endif #ifdef __BORLANDC__ + /* the end of the precompiled headers */ #pragma hdrstop +/* + * 'fd' is assigned a value that is never used in function ngx_event_init_conf + */ +#pragma warn -8004 + +/* condition is always false */ +#pragma warn -8008 + +/* functions containing (for|while|some if) are not expanded inline */ #pragma warn -8027 + +/* unreferenced formal parameter */ #pragma warn -8057 + +/* assignment within conditional expression */ #pragma warn -8060 -/* STUB */ -#pragma warn -8004 -#pragma warn -8008 -#pragma warn -8065 +/* unreachable code */ #pragma warn -8066 -#pragma warn -8075 + #endif @@ -96,7 +112,8 @@ #ifdef _MSC_VER typedef unsigned __int32 uint32_t; typedef __int32 int32_t; -#else /* __WATCOMC__ */ + +#else /* __WATCOMC__ and __BORLANDC__ */ typedef unsigned int uint32_t; typedef int int32_t; #endif |
