|
14 | 14 |
|
15 | 15 | #include "ffilesystem.h"
|
16 | 16 |
|
17 |
| -#if defined(_WIN32) |
| 17 | +#if defined(_WIN32) || defined(__CYGWIN__) |
18 | 18 | // create type PREPARSE_DATA_BUFFER
|
19 | 19 | // from ntifs.h, which can only be used by drivers
|
20 | 20 | // typedef is copied from https://gitlab.kitware.com/utils/kwsys/-/blob/master/SystemTools.cxx
|
@@ -62,7 +62,7 @@ typedef struct _REPARSE_DATA_BUFFER
|
62 | 62 | #endif
|
63 | 63 |
|
64 | 64 |
|
65 |
| -#if defined(_WIN32) |
| 65 | +#if defined(_WIN32) || defined(__CYGWIN__) |
66 | 66 | static bool fs_win32_get_reparse_buffer(std::string_view path, std::byte* buffer)
|
67 | 67 | {
|
68 | 68 |
|
@@ -132,7 +132,7 @@ bool fs_is_appexec_alias(std::string_view path)
|
132 | 132 | // https://gitlab.kitware.com/utils/kwsys/-/blob/master/SystemTools.cxx
|
133 | 133 | // that has a BSD 3-clause license
|
134 | 134 |
|
135 |
| -#if defined(_WIN32) |
| 135 | +#if defined(_WIN32) || defined(__CYGWIN__) |
136 | 136 | std::byte buffer[MAXIMUM_REPARSE_DATA_BUFFER_SIZE];
|
137 | 137 |
|
138 | 138 | if (!fs_win32_get_reparse_buffer(path, buffer))
|
@@ -161,7 +161,7 @@ bool fs_win32_is_symlink(std::string_view path)
|
161 | 161 | // https://gitlab.kitware.com/utils/kwsys/-/blob/master/SystemTools.cxx
|
162 | 162 | // that has a BSD 3-clause license
|
163 | 163 |
|
164 |
| -#if defined(_WIN32) |
| 164 | +#if defined(_WIN32) || defined(__CYGWIN__) |
165 | 165 | std::byte buffer[MAXIMUM_REPARSE_DATA_BUFFER_SIZE];
|
166 | 166 | // Since FILE_ATTRIBUTE_REPARSE_POINT is set this file must be
|
167 | 167 | // a symbolic link if it is not a reparse point.
|
@@ -195,7 +195,7 @@ std::string fs_win32_full_name(std::string_view path)
|
195 | 195 |
|
196 | 196 | std::error_code ec;
|
197 | 197 |
|
198 |
| -#if defined(_WIN32) |
| 198 | +#if defined(_WIN32) || defined(__CYGWIN__) |
199 | 199 | std::wstring const w = fs_win32_to_wide(path);
|
200 | 200 |
|
201 | 201 | auto const L = GetFullPathNameW(w.data(), 0, nullptr, nullptr);
|
@@ -232,7 +232,7 @@ std::string fs_win32_final_path(std::string_view path)
|
232 | 232 |
|
233 | 233 | std::error_code ec;
|
234 | 234 |
|
235 |
| -#if defined(_WIN32) |
| 235 | +#if defined(_WIN32) || defined(__CYGWIN__) |
236 | 236 | if(fs_trace) std::cout << "TRACE: win32_final_path(" << path << ")\n";
|
237 | 237 | // dwDesiredAccess=0 to allow getting parameters even without read permission
|
238 | 238 | // FILE_FLAG_BACKUP_SEMANTICS required to open a directory
|
|
0 commit comments