Work on CI support for MingW

This commit is contained in:
Steffen Schuemann 2019-05-14 06:09:48 +02:00
parent becbcfe4a2
commit 6dce8a3a8c
3 changed files with 9 additions and 10 deletions

View File

@ -54,7 +54,7 @@ build_script:
- cd build - cd build
- if [%compiler%]==[msvc] cmake -G"%generator%" .. - if [%compiler%]==[msvc] cmake -G"%generator%" ..
- if [%compiler%]==[mingw] set PATH=%toolchain%/bin;%PATH% - 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% - cmake --build . --config %configuration%
test_script: test_script:

View File

@ -21,5 +21,5 @@ BraceWrapping:
SplitEmptyNamespace: true SplitEmptyNamespace: true
BreakConstructorInitializers: BeforeComma BreakConstructorInitializers: BeforeComma
ConstructorInitializerAllOnOneLineOrOnePerLine: false ConstructorInitializerAllOnOneLineOrOnePerLine: false
IndentPPDirectives: None
... ...

View File

@ -1388,15 +1388,15 @@ namespace detail {
GHC_INLINE bool equals_simple_insensitive(const char* str1, const char* str2) GHC_INLINE bool equals_simple_insensitive(const char* str1, const char* str2)
{ {
#ifdef GHC_OS_WINDOWS #ifdef GHC_OS_WINDOWS
# ifdef __GNUC__ #ifdef __GNUC__
while (::tolower((unsigned char)*str1) == ::tolower((unsigned char)*str2++)) { while (::tolower((unsigned char)*str1) == ::tolower((unsigned char)*str2++)) {
if (*str1++ == 0) if (*str1++ == 0)
return true; return true;
} }
return false; return false;
# else #else
return 0 == ::_stricmp(str1, str2); return 0 == ::_stricmp(str1, str2);
# endif #endif
#else #else
return 0 == ::strcasecmp(str1, str2); return 0 == ::strcasecmp(str1, str2);
#endif #endif
@ -1823,7 +1823,6 @@ GHC_INLINE u8arguments::u8arguments(int& argc, char**& argv)
#endif #endif
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// 30.10.8.4.1 constructors and destructor // 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 GHC_OS_WINDOWS
# ifdef __GNUC__ #ifdef __GNUC__
auto oldAttr = GetFileAttributesW(p.wstring().c_str()); auto oldAttr = GetFileAttributesW(p.wstring().c_str());
if (oldAttr != INVALID_FILE_ATTRIBUTES) { if (oldAttr != INVALID_FILE_ATTRIBUTES) {
DWORD newAttr = ((prms & perms::owner_write) == perms::owner_write) ? oldAttr & ~FILE_ATTRIBUTE_READONLY : oldAttr | FILE_ATTRIBUTE_READONLY; 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()); ec = std::error_code(::GetLastError(), std::system_category());
# else #else
int mode = 0; int mode = 0;
if ((prms & perms::owner_read) == perms::owner_read) { if ((prms & perms::owner_read) == perms::owner_read) {
mode |= _S_IREAD; 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) { if (::_wchmod(p.wstring().c_str(), mode) != 0) {
ec = std::error_code(::GetLastError(), std::system_category()); ec = std::error_code(::GetLastError(), std::system_category());
} }
# endif #endif
#else #else
if ((opts & perm_options::nofollow) != perm_options::nofollow) { if ((opts & perm_options::nofollow) != perm_options::nofollow) {
if (::chmod(p.c_str(), static_cast<mode_t>(prms)) != 0) { if (::chmod(p.c_str(), static_cast<mode_t>(prms)) != 0) {