aboutsummaryrefslogtreecommitdiff
path: root/src/os/win32/ngx_files.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-11-11 14:07:14 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-11-11 14:07:14 +0000
commit1b73583ba2c0e4b72d951218827e0c621427d389 (patch)
tree9e4d204e2cce91560d5cb8908b8a1a9f2c1d92ee /src/os/win32/ngx_files.c
parentd6f24959428caed68a509a19ca4fd866d978a69c (diff)
downloadnginx-1b73583ba2c0e4b72d951218827e0c621427d389.tar.gz
nginx-1b73583ba2c0e4b72d951218827e0c621427d389.zip
nginx-0.1.5-RELEASE importrelease-0.1.5
*) Bugfix: on Solaris and Linux there may be too many "recvmsg() returned not enough data" alerts. *) Bugfix: there were the "writev() failed (22: Invalid argument)" errors on Solaris in proxy mode without sendfile. On other platforms that do not support sendfile at all the process got caught in an endless loop. *) Bugfix: segmentation fault on Solaris in proxy mode and using sendfile. *) Bugfix: segmentation fault on Solaris. *) Bugfix: on-line upgrade did not work on Linux. *) Bugfix: the ngx_http_autoindex_module module did not escape the spaces, the quotes, and the percent signs in the directory listing. *) Change: the decrease of the copy operations. *) Feature: the userid_p3p directive.
Diffstat (limited to 'src/os/win32/ngx_files.c')
-rw-r--r--src/os/win32/ngx_files.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/os/win32/ngx_files.c b/src/os/win32/ngx_files.c
index dea310698..ffd52c9bd 100644
--- a/src/os/win32/ngx_files.c
+++ b/src/os/win32/ngx_files.c
@@ -18,19 +18,20 @@ ssize_t ngx_read_file(ngx_file_t *file, u_char *buf, size_t size, off_t offset)
if (ngx_win32_version < NGX_WIN_NT) {
/*
- * in Win9X the overlapped pointer must be NULL
- * so we need to use SetFilePointer() to set the offset
+ * under Win9X the overlapped pointer must be NULL
+ * so we have to use SetFilePointer() to set the offset
*/
if (file->offset != offset) {
/*
- * the maximum file size on FAT16 is 2G, but on FAT32
- * the size is 4G so we need to use high_offset
+ * the maximum file size on the FAT16 is 2G, but on the FAT32
+ * the size is 4G so we have to use the high_offset
* because a single offset is signed value
*/
high_offset = (long) (offset >> 32);
+
if (SetFilePointer(file->fd, (long) offset, &high_offset,
FILE_BEGIN) == INVALID_SET_FILE_POINTER)
{
@@ -81,15 +82,15 @@ ssize_t ngx_write_file(ngx_file_t *file, u_char *buf, size_t size, off_t offset)
if (ngx_win32_version < NGX_WIN_NT) {
/*
- * in Win9X the overlapped pointer must be NULL
- * so we need to use SetFilePointer() to set the offset
+ * under Win9X the overlapped pointer must be NULL
+ * so we have to use SetFilePointer() to set the offset
*/
if (file->offset != offset) {
/*
- * the maximum file size on FAT16 is 2G, but on FAT32
- * the size is 4G so we need to use high_offset
+ * the maximum file size on the FAT16 is 2G, but on the FAT32
+ * the size is 4G so we have to use high_offset
* because a single offset is signed value
*/
@@ -189,8 +190,7 @@ int ngx_win32_rename_file(ngx_str_t *from, ngx_str_t *to, ngx_pool_t *pool)
do {
num = ngx_next_temp_number(collision);
- ngx_snprintf((char *) name + to->len, 1 + 10 + 1 + sizeof("DELETE"),
- ".%010u.DELETE", num);
+ ngx_sprintf(name + to->len, ".%010u.DELETE", num);
if (MoveFile((const char *) to->data, (const char *) name) == 0) {
collision = 1;