Skip to content

Commit

Permalink
Merge pull request #60 from dscho/sync-with-msys2-3.4.9
Browse files Browse the repository at this point in the history
Sync with the current MSYS2 runtime v3.4.9
  • Loading branch information
dscho authored Nov 23, 2023
2 parents be82660 + b039495 commit 9638e0a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
- name: Build
shell: msys2 {0}
run: |
# XXX: cygwin still uses gcc v11 so we get new warnings with v13,
# resulting in errors. We can't selectively disable warnigns since our
# cross compiler is also too old and doesn't understand the new
# warning flags, so we need to disable all errors for now.
export CXXFLAGS="-Wno-error -Wno-narrowing"
(cd winsup && ./autogen.sh)
./configure --disable-dependency-tracking
make -j8
Expand Down
11 changes: 9 additions & 2 deletions winsup/cygwin/msys2_path_conv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,13 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en

path_type result = NONE;

if (it + 1 == end) {
switch (*it) {
case '/': return ROOTED_PATH ;
default: return SIMPLE_WINDOWS_PATH;
}
}

if (isalpha(*it) && *(it + 1) == ':') {
if (*(it + 2) == '\\') {
return SIMPLE_WINDOWS_PATH;
Expand Down Expand Up @@ -483,7 +490,7 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en
if (isalpha(ch) && (*(it2+1) == ':') && (*(it2+2) == '/')) {
return SIMPLE_WINDOWS_PATH;
}
if (ch == '/'&& memchr(it2, ',', end - it) == NULL) {
if (ch == '/'&& memchr(it2, ',', end - it2) == NULL) {
*src = it2;
return find_path_start_and_type(src, true, end);
}
Expand Down Expand Up @@ -512,7 +519,7 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en
goto skip_p2w;
return POSIX_PATH_LIST;
}
} else if (memchr(it2, '=', end - it) == NULL) {
} else if (memchr(it2, '=', end - it2) == NULL) {
return SIMPLE_WINDOWS_PATH;
}
} else if (ch != '.') {
Expand Down

0 comments on commit 9638e0a

Please sign in to comment.