comparison src/os/unix/ngx_files.h @ 5262:626f288fa5ed

Make macros safe.
author Gleb Smirnoff <glebius@nginx.com>
date Fri, 05 Jul 2013 11:42:25 +0400
parents 8865fd1f3aa5
children acd51b0f6fd4
comparison
equal deleted inserted replaced
5261:af60a210cb78 5262:626f288fa5ed
70 #define NGX_FILE_RDONLY O_RDONLY 70 #define NGX_FILE_RDONLY O_RDONLY
71 #define NGX_FILE_WRONLY O_WRONLY 71 #define NGX_FILE_WRONLY O_WRONLY
72 #define NGX_FILE_RDWR O_RDWR 72 #define NGX_FILE_RDWR O_RDWR
73 #define NGX_FILE_CREATE_OR_OPEN O_CREAT 73 #define NGX_FILE_CREATE_OR_OPEN O_CREAT
74 #define NGX_FILE_OPEN 0 74 #define NGX_FILE_OPEN 0
75 #define NGX_FILE_TRUNCATE O_CREAT|O_TRUNC 75 #define NGX_FILE_TRUNCATE (O_CREAT|O_TRUNC)
76 #define NGX_FILE_APPEND O_WRONLY|O_APPEND 76 #define NGX_FILE_APPEND (O_WRONLY|O_APPEND)
77 #define NGX_FILE_NONBLOCK O_NONBLOCK 77 #define NGX_FILE_NONBLOCK O_NONBLOCK
78 78
79 #if (NGX_HAVE_OPENAT) 79 #if (NGX_HAVE_OPENAT)
80 #define NGX_FILE_NOFOLLOW O_NOFOLLOW 80 #define NGX_FILE_NOFOLLOW O_NOFOLLOW
81 81
84 #else 84 #else
85 #define NGX_FILE_DIRECTORY 0 85 #define NGX_FILE_DIRECTORY 0
86 #endif 86 #endif
87 87
88 #if defined(O_SEARCH) 88 #if defined(O_SEARCH)
89 #define NGX_FILE_SEARCH O_SEARCH|NGX_FILE_DIRECTORY 89 #define NGX_FILE_SEARCH (O_SEARCH|NGX_FILE_DIRECTORY)
90 90
91 #elif defined(O_EXEC) 91 #elif defined(O_EXEC)
92 #define NGX_FILE_SEARCH O_EXEC|NGX_FILE_DIRECTORY 92 #define NGX_FILE_SEARCH (O_EXEC|NGX_FILE_DIRECTORY)
93 93
94 #else 94 #else
95 #define NGX_FILE_SEARCH O_RDONLY|NGX_FILE_DIRECTORY 95 #define NGX_FILE_SEARCH (O_RDONLY|NGX_FILE_DIRECTORY)
96 #endif 96 #endif
97 97
98 #endif /* NGX_HAVE_OPENAT */ 98 #endif /* NGX_HAVE_OPENAT */
99 99
100 #define NGX_FILE_DEFAULT_ACCESS 0644 100 #define NGX_FILE_DEFAULT_ACCESS 0644