Mercurial > hg > nginx
comparison src/os/win32/ngx_files.h @ 2628:64a10d6b97bd
win32 ngx_open_file() supports utf8 names and NGX_FILE_APPEND
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 30 Mar 2009 14:51:51 +0000 |
parents | ceef364208c8 |
children | 9e0ae986b587 |
comparison
equal
deleted
inserted
replaced
2627:c9da3e4dc706 | 2628:64a10d6b97bd |
---|---|
55 | 55 |
56 #define NGX_INVALID_FILE INVALID_HANDLE_VALUE | 56 #define NGX_INVALID_FILE INVALID_HANDLE_VALUE |
57 #define NGX_FILE_ERROR 0 | 57 #define NGX_FILE_ERROR 0 |
58 | 58 |
59 | 59 |
60 /* | 60 ngx_fd_t ngx_open_file(u_char *name, u_long mode, u_long create, u_long access); |
61 * FILE_FLAG_BACKUP_SEMANTICS allows to obtain a handle to a directory | |
62 */ | |
63 | |
64 #define ngx_open_file(name, mode, create, access) \ | |
65 CreateFile((const char *) name, mode, \ | |
66 FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, \ | |
67 NULL, create, FILE_FLAG_BACKUP_SEMANTICS, NULL) | |
68 #define ngx_open_file_n "CreateFile()" | 61 #define ngx_open_file_n "CreateFile()" |
69 | 62 |
70 #define NGX_FILE_RDONLY GENERIC_READ | 63 #define NGX_FILE_RDONLY GENERIC_READ |
71 #define NGX_FILE_WRONLY GENERIC_WRITE | 64 #define NGX_FILE_WRONLY GENERIC_WRITE |
72 #define NGX_FILE_RDWR GENERIC_READ|GENERIC_WRITE | 65 #define NGX_FILE_RDWR GENERIC_READ|GENERIC_WRITE |
66 #define NGX_FILE_APPEND FILE_APPEND_DATA|SYNCHRONIZE | |
67 | |
73 #define NGX_FILE_CREATE_OR_OPEN OPEN_ALWAYS | 68 #define NGX_FILE_CREATE_OR_OPEN OPEN_ALWAYS |
74 #define NGX_FILE_OPEN OPEN_EXISTING | 69 #define NGX_FILE_OPEN OPEN_EXISTING |
75 #define NGX_FILE_APPEND 0 | |
76 | 70 |
77 #define NGX_FILE_DEFAULT_ACCESS 0 | 71 #define NGX_FILE_DEFAULT_ACCESS 0 |
78 #define NGX_FILE_OWNER_ACCESS 0 | 72 #define NGX_FILE_OWNER_ACCESS 0 |
79 | 73 |
80 | 74 |