aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_files.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/unix/ngx_files.h')
-rw-r--r--src/os/unix/ngx_files.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/os/unix/ngx_files.h b/src/os/unix/ngx_files.h
index aa7311d72..85dae3b97 100644
--- a/src/os/unix/ngx_files.h
+++ b/src/os/unix/ngx_files.h
@@ -17,8 +17,18 @@
+#ifdef __CYGWIN__
+
+#define ngx_open_file(name, mode, create, access) \
+ open((const char *) name, mode|create|O_BINARY, access)
+
+#else
+
#define ngx_open_file(name, mode, create, access) \
open((const char *) name, mode|create, access)
+
+#endif
+
#define ngx_open_file_n "open()"
#define NGX_FILE_RDONLY O_RDONLY