Mercurial > hg > nginx
comparison src/os/win32/ngx_files.h @ 8139:e818ed227735
Win32: non-ASCII names support in ngx_open_tempfile().
This makes it possible to use temporary directories with non-ASCII characters,
either explicitly or via a prefix with non-ASCII characters in it.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 23 Feb 2023 20:49:57 +0300 |
parents | 96d894b38667 |
children |
comparison
equal
deleted
inserted
replaced
8138:96d894b38667 | 8139:e818ed227735 |
---|---|
88 | 88 |
89 #define NGX_FILE_DEFAULT_ACCESS 0 | 89 #define NGX_FILE_DEFAULT_ACCESS 0 |
90 #define NGX_FILE_OWNER_ACCESS 0 | 90 #define NGX_FILE_OWNER_ACCESS 0 |
91 | 91 |
92 | 92 |
93 #define ngx_open_tempfile(name, persistent, access) \ | 93 ngx_fd_t ngx_open_tempfile(u_char *name, ngx_uint_t persistent, |
94 CreateFile((const char *) name, \ | 94 ngx_uint_t access); |
95 GENERIC_READ|GENERIC_WRITE, \ | |
96 FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, \ | |
97 NULL, \ | |
98 CREATE_NEW, \ | |
99 persistent ? 0: \ | |
100 FILE_ATTRIBUTE_TEMPORARY|FILE_FLAG_DELETE_ON_CLOSE, \ | |
101 NULL); | |
102 | |
103 #define ngx_open_tempfile_n "CreateFile()" | 95 #define ngx_open_tempfile_n "CreateFile()" |
104 | 96 |
105 | 97 |
106 #define ngx_close_file CloseHandle | 98 #define ngx_close_file CloseHandle |
107 #define ngx_close_file_n "CloseHandle()" | 99 #define ngx_close_file_n "CloseHandle()" |