comparison src/os/win32/ngx_files.h @ 2234:c7c319896bb4

*) autoconfigure struct dirent capabilities *) move src/os/.../ngx_types.h's content into src/os/.../ngx_files.h and delete src/os/.../ngx_types.h
author Igor Sysoev <igor@sysoev.ru>
date Fri, 05 Sep 2008 15:43:34 +0000
parents 992613253d93
children 1adec90a0e46
comparison
equal deleted inserted replaced
2233:f62751dab60d 2234:c7c319896bb4
8 #define _NGX_FILES_H_INCLUDED_ 8 #define _NGX_FILES_H_INCLUDED_
9 9
10 10
11 #include <ngx_config.h> 11 #include <ngx_config.h>
12 #include <ngx_core.h> 12 #include <ngx_core.h>
13
14
15 typedef HANDLE ngx_fd_t;
16 typedef BY_HANDLE_FILE_INFORMATION ngx_file_info_t;
17 typedef uint64_t ngx_file_uniq_t;
18
19 typedef struct {
20 HANDLE dir;
21 WIN32_FIND_DATA finddata;
22
23 unsigned valid_info:1;
24 unsigned valid_type:1;
25 unsigned ready:1;
26 } ngx_dir_t;
27
28
29 typedef struct {
30 HANDLE dir;
31 WIN32_FIND_DATA finddata;
32
33 unsigned ready:1;
34 unsigned test:1;
35 unsigned no_match:1;
36
37 u_char *pattern;
38 ngx_str_t name;
39 size_t last;
40 ngx_log_t *log;
41 } ngx_glob_t;
42
13 43
14 44
15 /* INVALID_FILE_ATTRIBUTES is specified but not defined at least in MSVC6SP2 */ 45 /* INVALID_FILE_ATTRIBUTES is specified but not defined at least in MSVC6SP2 */
16 #ifndef INVALID_FILE_ATTRIBUTES 46 #ifndef INVALID_FILE_ATTRIBUTES
17 #define INVALID_FILE_ATTRIBUTES 0xffffffff 47 #define INVALID_FILE_ATTRIBUTES 0xffffffff
182 (time_t) (((((unsigned __int64) \ 212 (time_t) (((((unsigned __int64) \
183 (dir)->finddata.ftLastWriteTime.dwHighDateTime << 32) \ 213 (dir)->finddata.ftLastWriteTime.dwHighDateTime << 32) \
184 | (dir)->finddata.ftLastWriteTime.dwLowDateTime) \ 214 | (dir)->finddata.ftLastWriteTime.dwLowDateTime) \
185 - 116444736000000000) / 10000000) 215 - 116444736000000000) / 10000000)
186 216
187 typedef struct {
188 HANDLE dir;
189 WIN32_FIND_DATA finddata;
190
191 unsigned ready:1;
192 unsigned test:1;
193 unsigned no_match:1;
194
195 u_char *pattern;
196 ngx_str_t name;
197 size_t last;
198 ngx_log_t *log;
199 } ngx_glob_t;
200
201 217
202 ngx_int_t ngx_open_glob(ngx_glob_t *gl); 218 ngx_int_t ngx_open_glob(ngx_glob_t *gl);
203 #define ngx_open_glob_n "FindFirstFile()" 219 #define ngx_open_glob_n "FindFirstFile()"
204 220
205 ngx_int_t ngx_read_glob(ngx_glob_t *gl, ngx_str_t *name); 221 ngx_int_t ngx_read_glob(ngx_glob_t *gl, ngx_str_t *name);