Mercurial > hg > nginx-quic
annotate src/os/unix/ngx_files.h @ 4401:d45742815c90
Fixed proxy_cache_use_stale in "no live upstreams" case.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 16 Jan 2012 11:01:52 +0000 |
parents | f72496073689 |
children | d620f497c50f |
rev | line source |
---|---|
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
336
diff
changeset
|
1 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
336
diff
changeset
|
2 /* |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
441
diff
changeset
|
3 * Copyright (C) Igor Sysoev |
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
336
diff
changeset
|
4 */ |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
336
diff
changeset
|
5 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
336
diff
changeset
|
6 |
8
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
6
diff
changeset
|
7 #ifndef _NGX_FILES_H_INCLUDED_ |
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
6
diff
changeset
|
8 #define _NGX_FILES_H_INCLUDED_ |
3
34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
9 |
34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
10 |
57
a499e0d1f16e
nginx-0.0.1-2003-01-30-10:28:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
26
diff
changeset
|
11 #include <ngx_config.h> |
278
0ba4821f4460
nginx-0.0.2-2004-03-04-10:04:55 import
Igor Sysoev <igor@sysoev.ru>
parents:
195
diff
changeset
|
12 #include <ngx_core.h> |
57
a499e0d1f16e
nginx-0.0.1-2003-01-30-10:28:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
26
diff
changeset
|
13 |
a499e0d1f16e
nginx-0.0.1-2003-01-30-10:28:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
26
diff
changeset
|
14 |
2234
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
15 typedef int ngx_fd_t; |
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
16 typedef struct stat ngx_file_info_t; |
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
17 typedef ino_t ngx_file_uniq_t; |
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
18 |
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
19 |
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
20 typedef struct { |
3651 | 21 u_char *name; |
22 size_t size; | |
23 void *addr; | |
24 ngx_fd_t fd; | |
25 ngx_log_t *log; | |
26 } ngx_file_mapping_t; | |
27 | |
28 | |
29 typedef struct { | |
2933 | 30 DIR *dir; |
31 struct dirent *de; | |
32 struct stat info; | |
2234
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
33 |
2933 | 34 unsigned type:8; |
35 unsigned valid_info:1; | |
2234
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
36 } ngx_dir_t; |
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
37 |
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
38 |
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
39 typedef struct { |
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
40 size_t n; |
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
41 glob_t pglob; |
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
42 u_char *pattern; |
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
43 ngx_log_t *log; |
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
44 ngx_uint_t test; |
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
45 } ngx_glob_t; |
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
46 |
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
47 |
26
53cb81681040
nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
24
diff
changeset
|
48 #define NGX_INVALID_FILE -1 |
53cb81681040
nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
24
diff
changeset
|
49 #define NGX_FILE_ERROR -1 |
53cb81681040
nginx-0.0.1-2002-12-15-09:25:09 import
Igor Sysoev <igor@sysoev.ru>
parents:
24
diff
changeset
|
50 |
3
34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
51 |
34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
52 |
1975 | 53 #ifdef __CYGWIN__ |
54 | |
2126
5e954395a15e
case insensitive file system location support provided by locale only
Igor Sysoev <igor@sysoev.ru>
parents:
1980
diff
changeset
|
55 #define NGX_HAVE_CASELESS_FILESYSTEM 1 |
5e954395a15e
case insensitive file system location support provided by locale only
Igor Sysoev <igor@sysoev.ru>
parents:
1980
diff
changeset
|
56 |
1975 | 57 #define ngx_open_file(name, mode, create, access) \ |
58 open((const char *) name, mode|create|O_BINARY, access) | |
59 | |
60 #else | |
61 | |
1048
c4f666fc3a7e
ngx_open_file(name, access, create) > ngx_open_file(name, mode, create, access)
Igor Sysoev <igor@sysoev.ru>
parents:
1046
diff
changeset
|
62 #define ngx_open_file(name, mode, create, access) \ |
c4f666fc3a7e
ngx_open_file(name, access, create) > ngx_open_file(name, mode, create, access)
Igor Sysoev <igor@sysoev.ru>
parents:
1046
diff
changeset
|
63 open((const char *) name, mode|create, access) |
1975 | 64 |
65 #endif | |
66 | |
5
62b1a364857c
nginx-0.0.1-2002-08-23-20:14:30 import
Igor Sysoev <igor@sysoev.ru>
parents:
3
diff
changeset
|
67 #define ngx_open_file_n "open()" |
62b1a364857c
nginx-0.0.1-2002-08-23-20:14:30 import
Igor Sysoev <igor@sysoev.ru>
parents:
3
diff
changeset
|
68 |
99
a059e1aa65d4
nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents:
75
diff
changeset
|
69 #define NGX_FILE_RDONLY O_RDONLY |
1054 | 70 #define NGX_FILE_WRONLY O_WRONLY |
99
a059e1aa65d4
nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents:
75
diff
changeset
|
71 #define NGX_FILE_RDWR O_RDWR |
a059e1aa65d4
nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents:
75
diff
changeset
|
72 #define NGX_FILE_CREATE_OR_OPEN O_CREAT |
a059e1aa65d4
nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents:
75
diff
changeset
|
73 #define NGX_FILE_OPEN 0 |
2686
9e0ae986b587
adopt NGX_FILE_TRUNCATE for win32
Igor Sysoev <igor@sysoev.ru>
parents:
2629
diff
changeset
|
74 #define NGX_FILE_TRUNCATE O_CREAT|O_TRUNC |
2629
367b29612a00
Win32 appends synchronized if only FILE_APPEND_DATA and SYNCHRONIZE are set
Igor Sysoev <igor@sysoev.ru>
parents:
2615
diff
changeset
|
75 #define NGX_FILE_APPEND O_WRONLY|O_APPEND |
3497
ac281bc4c187
use non-blocking open() not to hang on FIFO files, etc.
Igor Sysoev <igor@sysoev.ru>
parents:
3322
diff
changeset
|
76 #define NGX_FILE_NONBLOCK O_NONBLOCK |
99
a059e1aa65d4
nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents:
75
diff
changeset
|
77 |
1048
c4f666fc3a7e
ngx_open_file(name, access, create) > ngx_open_file(name, mode, create, access)
Igor Sysoev <igor@sysoev.ru>
parents:
1046
diff
changeset
|
78 #define NGX_FILE_DEFAULT_ACCESS 0644 |
2592
3a8a53c0c42f
a prelimiary proxy cache support
Igor Sysoev <igor@sysoev.ru>
parents:
2550
diff
changeset
|
79 #define NGX_FILE_OWNER_ACCESS 0600 |
1048
c4f666fc3a7e
ngx_open_file(name, access, create) > ngx_open_file(name, mode, create, access)
Igor Sysoev <igor@sysoev.ru>
parents:
1046
diff
changeset
|
80 |
99
a059e1aa65d4
nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents:
75
diff
changeset
|
81 |
24
77c7629a2627
nginx-0.0.1-2002-12-10-21:05:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
8
diff
changeset
|
82 #define ngx_close_file close |
77c7629a2627
nginx-0.0.1-2002-12-10-21:05:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
8
diff
changeset
|
83 #define ngx_close_file_n "close()" |
77c7629a2627
nginx-0.0.1-2002-12-10-21:05:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
8
diff
changeset
|
84 |
99
a059e1aa65d4
nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents:
75
diff
changeset
|
85 |
290
87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
86 #define ngx_delete_file(name) unlink((const char *) name) |
185
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
87 #define ngx_delete_file_n "unlink()" |
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
88 |
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
89 |
633 | 90 ngx_fd_t ngx_open_tempfile(u_char *name, ngx_uint_t persistent, |
1046 | 91 ngx_uint_t access); |
74
17ab1af8c3dd
nginx-0.0.1-2003-04-11-20:01:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
92 #define ngx_open_tempfile_n "open()" |
17ab1af8c3dd
nginx-0.0.1-2003-04-11-20:01:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
93 |
99
a059e1aa65d4
nginx-0.0.1-2003-06-02-19:24:30 import
Igor Sysoev <igor@sysoev.ru>
parents:
75
diff
changeset
|
94 |
290
87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
95 ssize_t ngx_read_file(ngx_file_t *file, u_char *buf, size_t size, off_t offset); |
2180 | 96 #if (NGX_HAVE_PREAD) |
97 #define ngx_read_file_n "pread()" | |
98 #else | |
5
62b1a364857c
nginx-0.0.1-2002-08-23-20:14:30 import
Igor Sysoev <igor@sysoev.ru>
parents:
3
diff
changeset
|
99 #define ngx_read_file_n "read()" |
2180 | 100 #endif |
3
34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
101 |
290
87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
102 ssize_t ngx_write_file(ngx_file_t *file, u_char *buf, size_t size, |
497 | 103 off_t offset); |
74
17ab1af8c3dd
nginx-0.0.1-2003-04-11-20:01:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
104 |
17ab1af8c3dd
nginx-0.0.1-2003-04-11-20:01:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
105 ssize_t ngx_write_chain_to_file(ngx_file_t *file, ngx_chain_t *ce, |
497 | 106 off_t offset, ngx_pool_t *pool); |
74
17ab1af8c3dd
nginx-0.0.1-2003-04-11-20:01:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
107 |
17ab1af8c3dd
nginx-0.0.1-2003-04-11-20:01:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
108 |
1055 | 109 #define ngx_read_fd read |
110 #define ngx_read_fd_n "read()" | |
111 | |
2302
2abf14c952a2
compatibility with glibc 2.3, warn_unused_result attribute for write()
Igor Sysoev <igor@sysoev.ru>
parents:
2259
diff
changeset
|
112 /* |
2abf14c952a2
compatibility with glibc 2.3, warn_unused_result attribute for write()
Igor Sysoev <igor@sysoev.ru>
parents:
2259
diff
changeset
|
113 * we use inlined function instead of simple #define |
2abf14c952a2
compatibility with glibc 2.3, warn_unused_result attribute for write()
Igor Sysoev <igor@sysoev.ru>
parents:
2259
diff
changeset
|
114 * because glibc 2.3 sets warn_unused_result attribute for write() |
2abf14c952a2
compatibility with glibc 2.3, warn_unused_result attribute for write()
Igor Sysoev <igor@sysoev.ru>
parents:
2259
diff
changeset
|
115 * and in this case gcc 4.3 ignores (void) cast |
2abf14c952a2
compatibility with glibc 2.3, warn_unused_result attribute for write()
Igor Sysoev <igor@sysoev.ru>
parents:
2259
diff
changeset
|
116 */ |
2abf14c952a2
compatibility with glibc 2.3, warn_unused_result attribute for write()
Igor Sysoev <igor@sysoev.ru>
parents:
2259
diff
changeset
|
117 static ngx_inline ssize_t |
2abf14c952a2
compatibility with glibc 2.3, warn_unused_result attribute for write()
Igor Sysoev <igor@sysoev.ru>
parents:
2259
diff
changeset
|
118 ngx_write_fd(ngx_fd_t fd, void *buf, size_t n) |
2abf14c952a2
compatibility with glibc 2.3, warn_unused_result attribute for write()
Igor Sysoev <igor@sysoev.ru>
parents:
2259
diff
changeset
|
119 { |
2abf14c952a2
compatibility with glibc 2.3, warn_unused_result attribute for write()
Igor Sysoev <igor@sysoev.ru>
parents:
2259
diff
changeset
|
120 return write(fd, buf, n); |
2abf14c952a2
compatibility with glibc 2.3, warn_unused_result attribute for write()
Igor Sysoev <igor@sysoev.ru>
parents:
2259
diff
changeset
|
121 } |
2abf14c952a2
compatibility with glibc 2.3, warn_unused_result attribute for write()
Igor Sysoev <igor@sysoev.ru>
parents:
2259
diff
changeset
|
122 |
1055 | 123 #define ngx_write_fd_n "write()" |
124 | |
2769
9d986c4e796f
introduce ngx_write_console() to support OEM code pages
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
125 |
9d986c4e796f
introduce ngx_write_console() to support OEM code pages
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
126 #define ngx_write_console ngx_write_fd |
9d986c4e796f
introduce ngx_write_console() to support OEM code pages
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
127 |
9d986c4e796f
introduce ngx_write_console() to support OEM code pages
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
128 |
571 | 129 #define ngx_linefeed(p) *p++ = LF; |
130 #define NGX_LINEFEED_SIZE 1 | |
4283
f72496073689
Introduction of simple ngx_write_stderr() instead of ngx_log_stderr()
Igor Sysoev <igor@sysoev.ru>
parents:
3970
diff
changeset
|
131 #define NGX_LINEFEED "\x0a" |
571 | 132 |
133 | |
633 | 134 #define ngx_rename_file(o, n) rename((const char *) o, (const char *) n) |
681 | 135 #define ngx_rename_file_n "rename()" |
170
c42be4185301
nginx-0.0.1-2003-11-03-01:56:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
99
diff
changeset
|
136 |
c42be4185301
nginx-0.0.1-2003-11-03-01:56:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
99
diff
changeset
|
137 |
669 | 138 #define ngx_change_file_access(n, a) chmod((const char *) n, a) |
681 | 139 #define ngx_change_file_access_n "chmod()" |
140 | |
141 | |
142 ngx_int_t ngx_set_file_time(u_char *name, ngx_fd_t fd, time_t s); | |
143 #define ngx_set_file_time_n "utimes()" | |
669 | 144 |
145 | |
290
87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
146 #define ngx_file_info(file, sb) stat((const char *) file, sb) |
186
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
147 #define ngx_file_info_n "stat()" |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
148 |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
149 #define ngx_fd_info(fd, sb) fstat(fd, sb) |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
150 #define ngx_fd_info_n "fstat()" |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
151 |
3501
423ff11e3018
use lstat() for WebDAV DELETE, COPY, and MOVE to handle symlinks
Igor Sysoev <igor@sysoev.ru>
parents:
3497
diff
changeset
|
152 #define ngx_link_info(file, sb) lstat((const char *) file, sb) |
423ff11e3018
use lstat() for WebDAV DELETE, COPY, and MOVE to handle symlinks
Igor Sysoev <igor@sysoev.ru>
parents:
3497
diff
changeset
|
153 #define ngx_link_info_n "lstat()" |
423ff11e3018
use lstat() for WebDAV DELETE, COPY, and MOVE to handle symlinks
Igor Sysoev <igor@sysoev.ru>
parents:
3497
diff
changeset
|
154 |
186
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
155 #define ngx_is_dir(sb) (S_ISDIR((sb)->st_mode)) |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
156 #define ngx_is_file(sb) (S_ISREG((sb)->st_mode)) |
669 | 157 #define ngx_is_link(sb) (S_ISLNK((sb)->st_mode)) |
3281 | 158 #define ngx_is_exec(sb) (((sb)->st_mode & S_IXUSR) == S_IXUSR) |
1053
b9fa23cda4cc
ngx_file_access() and ngx_de_access()
Igor Sysoev <igor@sysoev.ru>
parents:
1048
diff
changeset
|
159 #define ngx_file_access(sb) ((sb)->st_mode & 0777) |
186
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
160 #define ngx_file_size(sb) (sb)->st_size |
3899
e7cd13b7f759
Use more precise stat.st_blocks to account cache size on Unix
Igor Sysoev <igor@sysoev.ru>
parents:
3651
diff
changeset
|
161 #define ngx_file_fs_size(sb) ((sb)->st_blocks * 512) |
186
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
162 #define ngx_file_mtime(sb) (sb)->st_mtime |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
163 #define ngx_file_uniq(sb) (sb)->st_ino |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
164 |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
165 |
3651 | 166 ngx_int_t ngx_create_file_mapping(ngx_file_mapping_t *fm); |
167 void ngx_close_file_mapping(ngx_file_mapping_t *fm); | |
168 | |
169 | |
2126
5e954395a15e
case insensitive file system location support provided by locale only
Igor Sysoev <igor@sysoev.ru>
parents:
1980
diff
changeset
|
170 #if (NGX_HAVE_CASELESS_FILESYSTEM) |
5e954395a15e
case insensitive file system location support provided by locale only
Igor Sysoev <igor@sysoev.ru>
parents:
1980
diff
changeset
|
171 |
5e954395a15e
case insensitive file system location support provided by locale only
Igor Sysoev <igor@sysoev.ru>
parents:
1980
diff
changeset
|
172 #define ngx_filename_cmp(s1, s2, n) strncasecmp((char *) s1, (char *) s2, n) |
5e954395a15e
case insensitive file system location support provided by locale only
Igor Sysoev <igor@sysoev.ru>
parents:
1980
diff
changeset
|
173 |
5e954395a15e
case insensitive file system location support provided by locale only
Igor Sysoev <igor@sysoev.ru>
parents:
1980
diff
changeset
|
174 #else |
5e954395a15e
case insensitive file system location support provided by locale only
Igor Sysoev <igor@sysoev.ru>
parents:
1980
diff
changeset
|
175 |
5e954395a15e
case insensitive file system location support provided by locale only
Igor Sysoev <igor@sysoev.ru>
parents:
1980
diff
changeset
|
176 #define ngx_filename_cmp ngx_memcmp |
5e954395a15e
case insensitive file system location support provided by locale only
Igor Sysoev <igor@sysoev.ru>
parents:
1980
diff
changeset
|
177 |
5e954395a15e
case insensitive file system location support provided by locale only
Igor Sysoev <igor@sysoev.ru>
parents:
1980
diff
changeset
|
178 #endif |
5e954395a15e
case insensitive file system location support provided by locale only
Igor Sysoev <igor@sysoev.ru>
parents:
1980
diff
changeset
|
179 |
336
ca9a7f8c86da
nginx-0.0.3-2004-05-18-19:29:08 import
Igor Sysoev <igor@sysoev.ru>
parents:
333
diff
changeset
|
180 |
2259 | 181 #define ngx_realpath(p, r) realpath((char *) p, (char *) r) |
182 #define ngx_realpath_n "realpath()" | |
2758 | 183 #define ngx_getcwd(buf, size) (getcwd((char *) buf, size) != NULL) |
336
ca9a7f8c86da
nginx-0.0.3-2004-05-18-19:29:08 import
Igor Sysoev <igor@sysoev.ru>
parents:
333
diff
changeset
|
184 #define ngx_getcwd_n "getcwd()" |
2744 | 185 #define ngx_path_separator(c) ((c) == '/') |
186 | |
336
ca9a7f8c86da
nginx-0.0.3-2004-05-18-19:29:08 import
Igor Sysoev <igor@sysoev.ru>
parents:
333
diff
changeset
|
187 #define NGX_MAX_PATH PATH_MAX |
ca9a7f8c86da
nginx-0.0.3-2004-05-18-19:29:08 import
Igor Sysoev <igor@sysoev.ru>
parents:
333
diff
changeset
|
188 |
186
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
189 #define NGX_DIR_MASK_LEN 0 |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
190 |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
191 |
467 | 192 ngx_int_t ngx_open_dir(ngx_str_t *name, ngx_dir_t *dir); |
185
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
193 #define ngx_open_dir_n "opendir()" |
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
194 |
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
195 |
186
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
196 #define ngx_close_dir(d) closedir((d)->dir) |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
197 #define ngx_close_dir_n "closedir()" |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
198 |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
199 |
2234
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
200 ngx_int_t ngx_read_dir(ngx_dir_t *dir); |
185
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
201 #define ngx_read_dir_n "readdir()" |
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
202 |
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
203 |
669 | 204 #define ngx_create_dir(name, access) mkdir((const char *) name, access) |
186
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
205 #define ngx_create_dir_n "mkdir()" |
74
17ab1af8c3dd
nginx-0.0.1-2003-04-11-20:01:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
57
diff
changeset
|
206 |
3
34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
207 |
290
87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
278
diff
changeset
|
208 #define ngx_delete_dir(name) rmdir((const char *) name) |
185
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
209 #define ngx_delete_dir_n "rmdir()" |
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
210 |
d5f50cefc322
nginx-0.0.1-2003-11-14-19:52:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
184
diff
changeset
|
211 |
1089
b2e6eb425770
use ngx_dir_access() to enable search bits for directory
Igor Sysoev <igor@sysoev.ru>
parents:
1055
diff
changeset
|
212 #define ngx_dir_access(a) (a | (a & 0444) >> 2) |
b2e6eb425770
use ngx_dir_access() to enable search bits for directory
Igor Sysoev <igor@sysoev.ru>
parents:
1055
diff
changeset
|
213 |
b2e6eb425770
use ngx_dir_access() to enable search bits for directory
Igor Sysoev <igor@sysoev.ru>
parents:
1055
diff
changeset
|
214 |
457 | 215 #define ngx_de_name(dir) ((u_char *) (dir)->de->d_name) |
2234
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
216 #if (NGX_HAVE_D_NAMLEN) |
186
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
217 #define ngx_de_namelen(dir) (dir)->de->d_namlen |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
218 #else |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
219 #define ngx_de_namelen(dir) ngx_strlen((dir)->de->d_name) |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
220 #endif |
3200
26784c34e8be
*) reset cached dirent.d_type after stat()
Igor Sysoev <igor@sysoev.ru>
parents:
3178
diff
changeset
|
221 |
26784c34e8be
*) reset cached dirent.d_type after stat()
Igor Sysoev <igor@sysoev.ru>
parents:
3178
diff
changeset
|
222 static ngx_inline ngx_int_t |
26784c34e8be
*) reset cached dirent.d_type after stat()
Igor Sysoev <igor@sysoev.ru>
parents:
3178
diff
changeset
|
223 ngx_de_info(u_char *name, ngx_dir_t *dir) |
26784c34e8be
*) reset cached dirent.d_type after stat()
Igor Sysoev <igor@sysoev.ru>
parents:
3178
diff
changeset
|
224 { |
26784c34e8be
*) reset cached dirent.d_type after stat()
Igor Sysoev <igor@sysoev.ru>
parents:
3178
diff
changeset
|
225 dir->type = 0; |
26784c34e8be
*) reset cached dirent.d_type after stat()
Igor Sysoev <igor@sysoev.ru>
parents:
3178
diff
changeset
|
226 return stat((const char *) name, &dir->info); |
26784c34e8be
*) reset cached dirent.d_type after stat()
Igor Sysoev <igor@sysoev.ru>
parents:
3178
diff
changeset
|
227 } |
26784c34e8be
*) reset cached dirent.d_type after stat()
Igor Sysoev <igor@sysoev.ru>
parents:
3178
diff
changeset
|
228 |
186
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
229 #define ngx_de_info_n "stat()" |
497 | 230 #define ngx_de_link_info(name, dir) lstat((const char *) name, &(dir)->info) |
231 #define ngx_de_link_info_n "lstat()" | |
2234
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
232 |
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
233 #if (NGX_HAVE_D_TYPE) |
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
234 |
3200
26784c34e8be
*) reset cached dirent.d_type after stat()
Igor Sysoev <igor@sysoev.ru>
parents:
3178
diff
changeset
|
235 /* |
26784c34e8be
*) reset cached dirent.d_type after stat()
Igor Sysoev <igor@sysoev.ru>
parents:
3178
diff
changeset
|
236 * some file systems (e.g. XFS on Linux and CD9660 on FreeBSD) |
26784c34e8be
*) reset cached dirent.d_type after stat()
Igor Sysoev <igor@sysoev.ru>
parents:
3178
diff
changeset
|
237 * do not set dirent.d_type |
26784c34e8be
*) reset cached dirent.d_type after stat()
Igor Sysoev <igor@sysoev.ru>
parents:
3178
diff
changeset
|
238 */ |
2550
5e87ddb4764f
XFS on Linux does not set dirent.d_type,
Igor Sysoev <igor@sysoev.ru>
parents:
2302
diff
changeset
|
239 |
5e87ddb4764f
XFS on Linux does not set dirent.d_type,
Igor Sysoev <igor@sysoev.ru>
parents:
2302
diff
changeset
|
240 #define ngx_de_is_dir(dir) \ |
5e87ddb4764f
XFS on Linux does not set dirent.d_type,
Igor Sysoev <igor@sysoev.ru>
parents:
2302
diff
changeset
|
241 (((dir)->type) ? ((dir)->type == DT_DIR) : (S_ISDIR((dir)->info.st_mode))) |
5e87ddb4764f
XFS on Linux does not set dirent.d_type,
Igor Sysoev <igor@sysoev.ru>
parents:
2302
diff
changeset
|
242 #define ngx_de_is_file(dir) \ |
5e87ddb4764f
XFS on Linux does not set dirent.d_type,
Igor Sysoev <igor@sysoev.ru>
parents:
2302
diff
changeset
|
243 (((dir)->type) ? ((dir)->type == DT_REG) : (S_ISREG((dir)->info.st_mode))) |
5e87ddb4764f
XFS on Linux does not set dirent.d_type,
Igor Sysoev <igor@sysoev.ru>
parents:
2302
diff
changeset
|
244 #define ngx_de_is_link(dir) \ |
3200
26784c34e8be
*) reset cached dirent.d_type after stat()
Igor Sysoev <igor@sysoev.ru>
parents:
3178
diff
changeset
|
245 (((dir)->type) ? ((dir)->type == DT_LNK) : (S_ISLNK((dir)->info.st_mode))) |
2550
5e87ddb4764f
XFS on Linux does not set dirent.d_type,
Igor Sysoev <igor@sysoev.ru>
parents:
2302
diff
changeset
|
246 |
2234
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
247 #else |
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
248 |
186
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
249 #define ngx_de_is_dir(dir) (S_ISDIR((dir)->info.st_mode)) |
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
250 #define ngx_de_is_file(dir) (S_ISREG((dir)->info.st_mode)) |
497 | 251 #define ngx_de_is_link(dir) (S_ISLNK((dir)->info.st_mode)) |
2234
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
252 |
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
253 #endif |
c7c319896bb4
*) autoconfigure struct dirent capabilities
Igor Sysoev <igor@sysoev.ru>
parents:
2232
diff
changeset
|
254 |
1053
b9fa23cda4cc
ngx_file_access() and ngx_de_access()
Igor Sysoev <igor@sysoev.ru>
parents:
1048
diff
changeset
|
255 #define ngx_de_access(dir) (((dir)->info.st_mode) & 0777) |
186
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
256 #define ngx_de_size(dir) (dir)->info.st_size |
3970
2d05952a324d
elimination of reading cache files by cache loader
Igor Sysoev <igor@sysoev.ru>
parents:
3899
diff
changeset
|
257 #define ngx_de_fs_size(dir) ((dir)->info.st_blocks * 512) |
186
c1f3a3c7c5db
nginx-0.0.1-2003-11-17-00:49:42 import
Igor Sysoev <igor@sysoev.ru>
parents:
185
diff
changeset
|
258 #define ngx_de_mtime(dir) (dir)->info.st_mtime |
3
34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
259 |
34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
260 |
727 | 261 ngx_int_t ngx_open_glob(ngx_glob_t *gl); |
262 #define ngx_open_glob_n "glob()" | |
263 ngx_int_t ngx_read_glob(ngx_glob_t *gl, ngx_str_t *name); | |
264 void ngx_close_glob(ngx_glob_t *gl); | |
265 | |
266 | |
611 | 267 ngx_err_t ngx_trylock_fd(ngx_fd_t fd); |
268 ngx_err_t ngx_lock_fd(ngx_fd_t fd); | |
269 ngx_err_t ngx_unlock_fd(ngx_fd_t fd); | |
270 | |
271 #define ngx_trylock_fd_n "fcntl(F_SETLK, F_WRLCK)" | |
272 #define ngx_lock_fd_n "fcntl(F_SETLKW, F_WRLCK)" | |
273 #define ngx_unlock_fd_n "fcntl(F_SETLK, F_UNLCK)" | |
274 | |
275 | |
3178 | 276 #if (NGX_HAVE_F_READAHEAD) |
277 | |
278 #define NGX_HAVE_READ_AHEAD 1 | |
279 | |
280 #define ngx_read_ahead(fd, n) fcntl(fd, F_READAHEAD, (int) n) | |
281 #define ngx_read_ahead_n "fcntl(fd, F_READAHEAD)" | |
282 | |
283 #elif (NGX_HAVE_POSIX_FADVISE) | |
284 | |
285 #define NGX_HAVE_READ_AHEAD 1 | |
286 | |
3322
e19df6e65352
fix posix_fadvise() error handling
Igor Sysoev <igor@sysoev.ru>
parents:
3294
diff
changeset
|
287 ngx_int_t ngx_read_ahead(ngx_fd_t fd, size_t n); |
3178 | 288 #define ngx_read_ahead_n "posix_fadvise(POSIX_FADV_SEQUENTIAL)" |
289 | |
290 #else | |
291 | |
292 #define ngx_read_ahead(fd, n) 0 | |
293 #define ngx_read_ahead_n "ngx_read_ahead_n" | |
294 | |
295 #endif | |
296 | |
297 | |
2129 | 298 #if (NGX_HAVE_O_DIRECT) |
299 | |
2248
1adec90a0e46
disable directio for unaligned reads in Linux
Igor Sysoev <igor@sysoev.ru>
parents:
2234
diff
changeset
|
300 ngx_int_t ngx_directio_on(ngx_fd_t fd); |
1adec90a0e46
disable directio for unaligned reads in Linux
Igor Sysoev <igor@sysoev.ru>
parents:
2234
diff
changeset
|
301 #define ngx_directio_on_n "fcntl(O_DIRECT)" |
1adec90a0e46
disable directio for unaligned reads in Linux
Igor Sysoev <igor@sysoev.ru>
parents:
2234
diff
changeset
|
302 |
1adec90a0e46
disable directio for unaligned reads in Linux
Igor Sysoev <igor@sysoev.ru>
parents:
2234
diff
changeset
|
303 ngx_int_t ngx_directio_off(ngx_fd_t fd); |
1adec90a0e46
disable directio for unaligned reads in Linux
Igor Sysoev <igor@sysoev.ru>
parents:
2234
diff
changeset
|
304 #define ngx_directio_off_n "fcntl(!O_DIRECT)" |
2129 | 305 |
306 #elif (NGX_HAVE_F_NOCACHE) | |
307 | |
2248
1adec90a0e46
disable directio for unaligned reads in Linux
Igor Sysoev <igor@sysoev.ru>
parents:
2234
diff
changeset
|
308 #define ngx_directio_on(fd) fcntl(fd, F_NOCACHE, 1) |
1adec90a0e46
disable directio for unaligned reads in Linux
Igor Sysoev <igor@sysoev.ru>
parents:
2234
diff
changeset
|
309 #define ngx_directio_on_n "fcntl(F_NOCACHE, 1)" |
2129 | 310 |
2143 | 311 #elif (NGX_HAVE_DIRECTIO) |
312 | |
2248
1adec90a0e46
disable directio for unaligned reads in Linux
Igor Sysoev <igor@sysoev.ru>
parents:
2234
diff
changeset
|
313 #define ngx_directio_on(fd) directio(fd, DIRECTIO_ON) |
1adec90a0e46
disable directio for unaligned reads in Linux
Igor Sysoev <igor@sysoev.ru>
parents:
2234
diff
changeset
|
314 #define ngx_directio_on_n "directio(DIRECTIO_ON)" |
2143 | 315 |
2129 | 316 #else |
317 | |
2248
1adec90a0e46
disable directio for unaligned reads in Linux
Igor Sysoev <igor@sysoev.ru>
parents:
2234
diff
changeset
|
318 #define ngx_directio_on(fd) 0 |
1adec90a0e46
disable directio for unaligned reads in Linux
Igor Sysoev <igor@sysoev.ru>
parents:
2234
diff
changeset
|
319 #define ngx_directio_on_n "ngx_directio_on_n" |
2129 | 320 |
321 #endif | |
322 | |
2615 | 323 size_t ngx_fs_bsize(u_char *name); |
324 | |
325 | |
2743
d8316f307b6a
issue start up errors and warning on both stderr and error_log
Igor Sysoev <igor@sysoev.ru>
parents:
2686
diff
changeset
|
326 #define ngx_stderr STDERR_FILENO |
d8316f307b6a
issue start up errors and warning on both stderr and error_log
Igor Sysoev <igor@sysoev.ru>
parents:
2686
diff
changeset
|
327 #define ngx_set_stderr(fd) dup2(fd, STDERR_FILENO) |
d8316f307b6a
issue start up errors and warning on both stderr and error_log
Igor Sysoev <igor@sysoev.ru>
parents:
2686
diff
changeset
|
328 #define ngx_set_stderr_n "dup2(STDERR_FILENO)" |
d8316f307b6a
issue start up errors and warning on both stderr and error_log
Igor Sysoev <igor@sysoev.ru>
parents:
2686
diff
changeset
|
329 |
d8316f307b6a
issue start up errors and warning on both stderr and error_log
Igor Sysoev <igor@sysoev.ru>
parents:
2686
diff
changeset
|
330 |
3052
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2933
diff
changeset
|
331 #if (NGX_HAVE_FILE_AIO) |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2933
diff
changeset
|
332 |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2933
diff
changeset
|
333 ssize_t ngx_file_aio_read(ngx_file_t *file, u_char *buf, size_t size, |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2933
diff
changeset
|
334 off_t offset, ngx_pool_t *pool); |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2933
diff
changeset
|
335 |
3294
04cfc09b8b8d
export aio presence knowledge to prevent using "aio sendfile",
Igor Sysoev <igor@sysoev.ru>
parents:
3281
diff
changeset
|
336 extern ngx_uint_t ngx_file_aio; |
04cfc09b8b8d
export aio presence knowledge to prevent using "aio sendfile",
Igor Sysoev <igor@sysoev.ru>
parents:
3281
diff
changeset
|
337 |
3052
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2933
diff
changeset
|
338 #endif |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2933
diff
changeset
|
339 |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2933
diff
changeset
|
340 |
8
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
6
diff
changeset
|
341 #endif /* _NGX_FILES_H_INCLUDED_ */ |