summaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-03-16 21:26:01 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-03-16 21:26:01 +0000
commitda85f7f5fc233a10abf3cbcbda547c918b67fb27 (patch)
treecf196e3f59770ee720b4ad387eee004b4f28f762 /src/core
parent9c61095a30ed2b6bf051dacbbbd26ae2769d9e34 (diff)
downloadnginx-da85f7f5fc233a10abf3cbcbda547c918b67fb27.tar.gz
nginx-da85f7f5fc233a10abf3cbcbda547c918b67fb27.tar.bz2
nginx-0.0.3-2004-03-17-00:26:01 import
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ngx_conf_file.h2
-rw-r--r--src/core/ngx_file.c18
-rw-r--r--src/core/ngx_file.h2
-rw-r--r--src/core/ngx_string.h6
4 files changed, 8 insertions, 20 deletions
diff --git a/src/core/ngx_conf_file.h b/src/core/ngx_conf_file.h
index 8b4aa490e..ee90855e7 100644
--- a/src/core/ngx_conf_file.h
+++ b/src/core/ngx_conf_file.h
@@ -212,7 +212,7 @@ char *ngx_conf_check_num_bounds(ngx_conf_t *cf, void *post, void *data);
conf.data = prev.data; \
} else { \
conf.len = sizeof(default) - 1; \
- conf.data = default; \
+ conf.data = (u_char *) default; \
} \
}
diff --git a/src/core/ngx_file.c b/src/core/ngx_file.c
index cbb1cb2c3..48cff4624 100644
--- a/src/core/ngx_file.c
+++ b/src/core/ngx_file.c
@@ -57,24 +57,10 @@ int ngx_create_temp_file(ngx_file_t *file, ngx_path_t *path,
ngx_create_hashed_filename(file, path);
#if 0
-#if (WIN32)
- file->fd = CreateFile(file->name.data,
- GENERIC_READ|GENERIC_WRITE,
- FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- NULL,
- CREATE_NEW,
- persistent ? 0:
- FILE_ATTRIBUTE_TEMPORARY|FILE_FLAG_DELETE_ON_CLOSE,
- NULL);
-#else
- file->fd = open(file->name.data, O_CREAT|O_EXCL|O_WRONLY, 0600);
-#endif
-#endif
-
-#if 0
file->fd = ngx_open_tempfile(file->name.data, persistent);
-#endif
+#else
file->fd = ngx_open_tempfile(file->name.data, 1);
+#endif
ngx_log_debug1(NGX_LOG_DEBUG_CORE, file->log, 0,
"temp fd:%d", file->fd);
diff --git a/src/core/ngx_file.h b/src/core/ngx_file.h
index 6afe1d1d5..db46d5408 100644
--- a/src/core/ngx_file.h
+++ b/src/core/ngx_file.h
@@ -61,7 +61,7 @@ char *ngx_conf_set_path_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
if (prev == NULL) { \
ngx_test_null(conf, ngx_palloc(pool, sizeof(ngx_path_t)), NULL); \
conf->name.len = sizeof(path) - 1; \
- conf->name.data = path; \
+ conf->name.data = (u_char *) path; \
conf->level[0] = l1; \
conf->level[1] = l2; \
conf->level[2] = l3; \
diff --git a/src/core/ngx_string.h b/src/core/ngx_string.h
index 84110b9a5..09de18e52 100644
--- a/src/core/ngx_string.h
+++ b/src/core/ngx_string.h
@@ -18,8 +18,10 @@ typedef struct {
#if (WIN32)
-#define ngx_strncasecmp strnicmp
-#define ngx_strcasecmp stricmp
+#define ngx_strncasecmp(s1, s2, n) \
+ strnicmp((const char *) s1, (const char *) s2, n)
+#define ngx_strcasecmp(s1, s2) \
+ stricmp((const char *) s1, (const char *) s2)
#define ngx_snprintf _snprintf
#define ngx_vsnprintf _vsnprintf