Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with the current MSYS2 runtime v3.4.9 #60

Merged
merged 4 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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