mirror of
https://git.mirrors.martin98.com/https://github.com/gulrak/filesystem
synced 2025-07-21 17:04:24 +08:00
Work on CI support for MingW
This commit is contained in:
parent
becbcfe4a2
commit
6dce8a3a8c
@ -54,7 +54,7 @@ build_script:
|
||||
- cd build
|
||||
- if [%compiler%]==[msvc] cmake -G"%generator%" ..
|
||||
- if [%compiler%]==[mingw] set PATH=%toolchain%/bin;%PATH%
|
||||
- if [%compiler%]==[mingw] cmake -G"%generator%" -DCMAKE_SH=CMAKE_SH-NOTFOUND -DCMAKE_PREFIX_PATH=C:\mingw-w64\%toolchain% -DCMAKE_BUILD_TYPE=%configuration% ..
|
||||
- if [%compiler%]==[mingw] cmake -G"%generator%" -DCMAKE_SH=CMAKE_SH-NOTFOUND -DCMAKE_PREFIX_PATH=%toolchain% -DCMAKE_BUILD_TYPE=%configuration% ..
|
||||
- cmake --build . --config %configuration%
|
||||
|
||||
test_script:
|
||||
|
@ -21,5 +21,5 @@ BraceWrapping:
|
||||
SplitEmptyNamespace: true
|
||||
BreakConstructorInitializers: BeforeComma
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
|
||||
IndentPPDirectives: None
|
||||
...
|
||||
|
@ -1057,7 +1057,7 @@ GHC_INLINE std::error_code make_error_code(portable_error err)
|
||||
return std::error_code(ERROR_INVALID_PARAMETER, std::system_category());
|
||||
case portable_error::is_a_directory:
|
||||
#ifdef ERROR_DIRECTORY_NOT_SUPPORTED
|
||||
return std::error_code(ERROR_DIRECTORY_NOT_SUPPORTED, std::system_category());
|
||||
return std::error_code(ERROR_DIRECTORY_NOT_SUPPORTED, std::system_category());
|
||||
#else
|
||||
return std::error_code(ERROR_NOT_SUPPORTED, std::system_category());
|
||||
#endif
|
||||
@ -1388,15 +1388,15 @@ namespace detail {
|
||||
GHC_INLINE bool equals_simple_insensitive(const char* str1, const char* str2)
|
||||
{
|
||||
#ifdef GHC_OS_WINDOWS
|
||||
# ifdef __GNUC__
|
||||
#ifdef __GNUC__
|
||||
while (::tolower((unsigned char)*str1) == ::tolower((unsigned char)*str2++)) {
|
||||
if (*str1++ == 0)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
# else
|
||||
#else
|
||||
return 0 == ::_stricmp(str1, str2);
|
||||
# endif
|
||||
#endif
|
||||
#else
|
||||
return 0 == ::strcasecmp(str1, str2);
|
||||
#endif
|
||||
@ -1823,7 +1823,6 @@ GHC_INLINE u8arguments::u8arguments(int& argc, char**& argv)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// 30.10.8.4.1 constructors and destructor
|
||||
|
||||
@ -3773,7 +3772,7 @@ GHC_INLINE void permissions(const path& p, perms prms, perm_options opts, std::e
|
||||
}
|
||||
}
|
||||
#ifdef GHC_OS_WINDOWS
|
||||
# ifdef __GNUC__
|
||||
#ifdef __GNUC__
|
||||
auto oldAttr = GetFileAttributesW(p.wstring().c_str());
|
||||
if (oldAttr != INVALID_FILE_ATTRIBUTES) {
|
||||
DWORD newAttr = ((prms & perms::owner_write) == perms::owner_write) ? oldAttr & ~FILE_ATTRIBUTE_READONLY : oldAttr | FILE_ATTRIBUTE_READONLY;
|
||||
@ -3782,7 +3781,7 @@ GHC_INLINE void permissions(const path& p, perms prms, perm_options opts, std::e
|
||||
}
|
||||
}
|
||||
ec = std::error_code(::GetLastError(), std::system_category());
|
||||
# else
|
||||
#else
|
||||
int mode = 0;
|
||||
if ((prms & perms::owner_read) == perms::owner_read) {
|
||||
mode |= _S_IREAD;
|
||||
@ -3793,7 +3792,7 @@ GHC_INLINE void permissions(const path& p, perms prms, perm_options opts, std::e
|
||||
if (::_wchmod(p.wstring().c_str(), mode) != 0) {
|
||||
ec = std::error_code(::GetLastError(), std::system_category());
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
#else
|
||||
if ((opts & perm_options::nofollow) != perm_options::nofollow) {
|
||||
if (::chmod(p.c_str(), static_cast<mode_t>(prms)) != 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user