summaryrefslogtreecommitdiffhomepage
path: root/src/os
diff options
context:
space:
mode:
Diffstat (limited to 'src/os')
-rw-r--r--src/os/unix/ngx_files.h6
-rw-r--r--src/os/win32/ngx_files.h6
2 files changed, 8 insertions, 4 deletions
diff --git a/src/os/unix/ngx_files.h b/src/os/unix/ngx_files.h
index 1e98fc081..d89aee0ad 100644
--- a/src/os/unix/ngx_files.h
+++ b/src/os/unix/ngx_files.h
@@ -17,8 +17,8 @@
-#define ngx_open_file(name, access, create) \
- open((const char *) name, access|create, 0644)
+#define ngx_open_file(name, mode, create, access) \
+ open((const char *) name, mode|create, access)
#define ngx_open_file_n "open()"
#define NGX_FILE_RDONLY O_RDONLY
@@ -28,6 +28,8 @@
#define NGX_FILE_TRUNCATE O_TRUNC
#define NGX_FILE_APPEND O_APPEND
+#define NGX_FILE_DEFAULT_ACCESS 0644
+
#define ngx_close_file close
#define ngx_close_file_n "close()"
diff --git a/src/os/win32/ngx_files.h b/src/os/win32/ngx_files.h
index 401b4df58..0815d3ea1 100644
--- a/src/os/win32/ngx_files.h
+++ b/src/os/win32/ngx_files.h
@@ -28,8 +28,8 @@
-#define ngx_open_file(name, access, create) \
- CreateFile((const char *) name, access, \
+#define ngx_open_file(name, mode, create, access) \
+ CreateFile((const char *) name, mode, \
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, \
NULL, create, FILE_FLAG_BACKUP_SEMANTICS, NULL)
/*
@@ -43,6 +43,8 @@
#define NGX_FILE_OPEN OPEN_EXISTING
#define NGX_FILE_APPEND 0
+#define NGX_FILE_DEFAULT_ACCESS 0
+
ngx_int_t ngx_file_append_mode(ngx_fd_t fd);
#define ngx_file_append_mode_n "SetFilePointer()"