Mercurial > hg > nginx-vendor-current
comparison src/os/unix/ngx_files.h @ 664:f5b859b2f097 NGINX_1_1_16
nginx 1.1.16
*) Change: the simultaneous subrequest limit has been raised to 200.
*) Feature: the "from" parameter of the "disable_symlinks" directive.
*) Feature: the "return" and "error_page" directives can be used to
return 307 redirections.
*) Bugfix: a segmentation fault might occur in a worker process if the
"resolver" directive was used and there was no "error_log" directive
specified at global level.
Thanks to Roman Arutyunyan.
*) Bugfix: a segmentation fault might occur in a worker process if the
"proxy_http_version 1.1" or "fastcgi_keep_conn on" directives were
used.
*) Bugfix: memory leaks.
Thanks to Lanshun Zhou.
*) Bugfix: in the "disable_symlinks" directive.
*) Bugfix: on ZFS filesystem disk cache size might be calculated
incorrectly; the bug had appeared in 1.0.1.
*) Bugfix: nginx could not be built by the icc 12.1 compiler.
*) Bugfix: nginx could not be built by gcc on Solaris; the bug had
appeared in 1.1.15.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 29 Feb 2012 00:00:00 +0400 |
parents | e5fa0a4a7d27 |
children | 9fbf3ad94cbf |
comparison
equal
deleted
inserted
replaced
663:dd668cf20818 | 664:f5b859b2f097 |
---|---|
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 #endif | 81 |
82 #if defined(O_DIRECTORY) | |
83 #define NGX_FILE_DIRECTORY O_DIRECTORY | |
84 #else | |
85 #define NGX_FILE_DIRECTORY 0 | |
86 #endif | |
87 | |
88 #if defined(O_SEARCH) | |
89 #define NGX_FILE_SEARCH O_SEARCH|NGX_FILE_DIRECTORY | |
90 | |
91 #elif defined(O_EXEC) | |
92 #define NGX_FILE_SEARCH O_EXEC|NGX_FILE_DIRECTORY | |
93 | |
94 #else | |
95 #define NGX_FILE_SEARCH O_RDONLY|NGX_FILE_DIRECTORY | |
96 #endif | |
97 | |
98 #endif /* NGX_HAVE_OPENAT */ | |
82 | 99 |
83 #define NGX_FILE_DEFAULT_ACCESS 0644 | 100 #define NGX_FILE_DEFAULT_ACCESS 0644 |
84 #define NGX_FILE_OWNER_ACCESS 0600 | 101 #define NGX_FILE_OWNER_ACCESS 0600 |
85 | 102 |
86 | 103 |
161 #define ngx_is_file(sb) (S_ISREG((sb)->st_mode)) | 178 #define ngx_is_file(sb) (S_ISREG((sb)->st_mode)) |
162 #define ngx_is_link(sb) (S_ISLNK((sb)->st_mode)) | 179 #define ngx_is_link(sb) (S_ISLNK((sb)->st_mode)) |
163 #define ngx_is_exec(sb) (((sb)->st_mode & S_IXUSR) == S_IXUSR) | 180 #define ngx_is_exec(sb) (((sb)->st_mode & S_IXUSR) == S_IXUSR) |
164 #define ngx_file_access(sb) ((sb)->st_mode & 0777) | 181 #define ngx_file_access(sb) ((sb)->st_mode & 0777) |
165 #define ngx_file_size(sb) (sb)->st_size | 182 #define ngx_file_size(sb) (sb)->st_size |
166 #define ngx_file_fs_size(sb) ((sb)->st_blocks * 512) | 183 #define ngx_file_fs_size(sb) ngx_max((sb)->st_size, (sb)->st_blocks * 512) |
167 #define ngx_file_mtime(sb) (sb)->st_mtime | 184 #define ngx_file_mtime(sb) (sb)->st_mtime |
168 #define ngx_file_uniq(sb) (sb)->st_ino | 185 #define ngx_file_uniq(sb) (sb)->st_ino |
169 | 186 |
170 | 187 |
171 ngx_int_t ngx_create_file_mapping(ngx_file_mapping_t *fm); | 188 ngx_int_t ngx_create_file_mapping(ngx_file_mapping_t *fm); |
257 | 274 |
258 #endif | 275 #endif |
259 | 276 |
260 #define ngx_de_access(dir) (((dir)->info.st_mode) & 0777) | 277 #define ngx_de_access(dir) (((dir)->info.st_mode) & 0777) |
261 #define ngx_de_size(dir) (dir)->info.st_size | 278 #define ngx_de_size(dir) (dir)->info.st_size |
262 #define ngx_de_fs_size(dir) ((dir)->info.st_blocks * 512) | 279 #define ngx_de_fs_size(dir) \ |
280 ngx_max((dir)->info.st_size, (dir)->info.st_blocks * 512) | |
263 #define ngx_de_mtime(dir) (dir)->info.st_mtime | 281 #define ngx_de_mtime(dir) (dir)->info.st_mtime |
264 | 282 |
265 | 283 |
266 ngx_int_t ngx_open_glob(ngx_glob_t *gl); | 284 ngx_int_t ngx_open_glob(ngx_glob_t *gl); |
267 #define ngx_open_glob_n "glob()" | 285 #define ngx_open_glob_n "glob()" |
338 #define ngx_file_at_info(fd, name, sb, flag) \ | 356 #define ngx_file_at_info(fd, name, sb, flag) \ |
339 fstatat(fd, (const char *) name, sb, flag) | 357 fstatat(fd, (const char *) name, sb, flag) |
340 | 358 |
341 #define ngx_file_at_info_n "fstatat()" | 359 #define ngx_file_at_info_n "fstatat()" |
342 | 360 |
361 #define NGX_AT_FDCWD (ngx_fd_t) AT_FDCWD | |
362 | |
343 #endif | 363 #endif |
344 | 364 |
345 | 365 |
346 #define ngx_stderr STDERR_FILENO | 366 #define ngx_stderr STDERR_FILENO |
347 #define ngx_set_stderr(fd) dup2(fd, STDERR_FILENO) | 367 #define ngx_set_stderr(fd) dup2(fd, STDERR_FILENO) |