aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_files.h
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@nginx.com>2013-07-05 11:42:25 +0400
committerGleb Smirnoff <glebius@nginx.com>2013-07-05 11:42:25 +0400
commit050f74b751c10eeb2491ec6509d0508a7e690209 (patch)
treee9541351fa0778e383207a261dfcf6be7d19fe92 /src/os/unix/ngx_files.h
parent523191ec89a11f3ffc81f6b6b710f46f86fa33d0 (diff)
downloadnginx-050f74b751c10eeb2491ec6509d0508a7e690209.tar.gz
nginx-050f74b751c10eeb2491ec6509d0508a7e690209.zip
Make macros safe.
Diffstat (limited to 'src/os/unix/ngx_files.h')
-rw-r--r--src/os/unix/ngx_files.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/os/unix/ngx_files.h b/src/os/unix/ngx_files.h
index 9c97e2bb7..4e3ed7db4 100644
--- a/src/os/unix/ngx_files.h
+++ b/src/os/unix/ngx_files.h
@@ -72,8 +72,8 @@ typedef struct {
#define NGX_FILE_RDWR O_RDWR
#define NGX_FILE_CREATE_OR_OPEN O_CREAT
#define NGX_FILE_OPEN 0
-#define NGX_FILE_TRUNCATE O_CREAT|O_TRUNC
-#define NGX_FILE_APPEND O_WRONLY|O_APPEND
+#define NGX_FILE_TRUNCATE (O_CREAT|O_TRUNC)
+#define NGX_FILE_APPEND (O_WRONLY|O_APPEND)
#define NGX_FILE_NONBLOCK O_NONBLOCK
#if (NGX_HAVE_OPENAT)
@@ -86,13 +86,13 @@ typedef struct {
#endif
#if defined(O_SEARCH)
-#define NGX_FILE_SEARCH O_SEARCH|NGX_FILE_DIRECTORY
+#define NGX_FILE_SEARCH (O_SEARCH|NGX_FILE_DIRECTORY)
#elif defined(O_EXEC)
-#define NGX_FILE_SEARCH O_EXEC|NGX_FILE_DIRECTORY
+#define NGX_FILE_SEARCH (O_EXEC|NGX_FILE_DIRECTORY)
#else
-#define NGX_FILE_SEARCH O_RDONLY|NGX_FILE_DIRECTORY
+#define NGX_FILE_SEARCH (O_RDONLY|NGX_FILE_DIRECTORY)
#endif
#endif /* NGX_HAVE_OPENAT */