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

Synchronize with MSYS2's current version of the MSYS2 runtime #136

Merged
merged 3 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From 0e7d0755a911149d0c517c6b93887b3155a9cfe0 Mon Sep 17 00:00:00 2001
From: Kai Pastor <[email protected]>
Date: Tue, 21 Nov 2023 09:24:03 +0100
Subject: [PATCH 62/N] fixup! Add functionality for converting UNIX paths in
arguments and environment variables to Windows form for native Win32
applications.

Don't memchr behind end, it+1
---
winsup/cygwin/msys2_path_conv.cc | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/winsup/cygwin/msys2_path_conv.cc b/winsup/cygwin/msys2_path_conv.cc
index 2bdf0ae..d4f0192 100644
--- a/winsup/cygwin/msys2_path_conv.cc
+++ b/winsup/cygwin/msys2_path_conv.cc
@@ -349,6 +349,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;
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From 677ece60fc37b0c5d336db1e345a4c33ffff15f6 Mon Sep 17 00:00:00 2001
From: Kai Pastor <[email protected]>
Date: Tue, 21 Nov 2023 09:25:58 +0100
Subject: [PATCH 63/N] fixup! Add functionality for converting UNIX paths in
arguments and environment variables to Windows form for native Win32
applications.

Don't memchr behind end, it2
---
winsup/cygwin/msys2_path_conv.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/msys2_path_conv.cc b/winsup/cygwin/msys2_path_conv.cc
index 617f74c4b9..133939a7a8 100644
--- a/winsup/cygwin/msys2_path_conv.cc
+++ b/winsup/cygwin/msys2_path_conv.cc
@@ -490,7 +490,7 @@ skip_p2w:
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);
}
@@ -519,7 +519,7 @@ skip_p2w:
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 != '.') {
22 changes: 17 additions & 5 deletions msys2-runtime/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
pkgbase=msys2-runtime
pkgname=('msys2-runtime' 'msys2-runtime-devel')
pkgver=3.4.9
pkgrel=1
pkgrel=2
pkgdesc="Cygwin POSIX emulation engine"
arch=('x86_64')
url="https://www.cygwin.com/"
Expand Down Expand Up @@ -87,9 +87,11 @@ source=('msys2-runtime'::git+https://github.com/cygwin/cygwin#tag=cygwin-${pkgve
0058-Avoid-sharing-cygheaps-across-Cygwin-versions.patch
0059-uname-report-msys2-runtime-commit-hash-too.patch
0060-Revert-Cygwin-pipe-Restore-blocking-mode-for-cygwin-.patch
0061-msys2-runtime-restore-fast-path-for-current-user-pri.patch)
0061-msys2-runtime-restore-fast-path-for-current-user-pri.patch
0062-fixup-Add-functionality-for-converting-UNIX-paths-in.patch
0063-fixup-Add-functionality-for-converting-UNIX-paths-in.patch)
sha256sums=('SKIP'
'daeaa55468ef315aa8796bb8ff416ce2e50d3f94ac34fd507ff4306460066142'
'f1049252bc3891471b535672a2ef5eb1af794ac4bb0fedbc65852e6d98186932'
'021fd67841a12ef09dd72d08e3ed4a1ccc58d38dc475bdf79ecff3a90c7d6197'
'6b6187c8e9343cf2875fe8d622762892bfb2d8087f1e510882928ec63584e4bc'
'0b8933eb38b42aed816bdded768ed92047e220157085778a0dbf23278d8355d9'
Expand Down Expand Up @@ -150,7 +152,9 @@ sha256sums=('SKIP'
'0c94d7eb14cb56efa4a9b41cb7f99bb7d625942e8d61c4692d98f0c70c4d370f'
'bd6bdc7c022ac9cf7235548c152fed3b303fe69acf5a50e0e237c23a31d6c974'
'a697e81d8abd85fc10e5764afc551e775e99e8b49880c665474c102e005329ed'
'4985310df62a892d938dbd3d6b7a358d1b82bbf6e3a7a0e90fee84ea6dd9e5a4')
'4985310df62a892d938dbd3d6b7a358d1b82bbf6e3a7a0e90fee84ea6dd9e5a4'
'58d6e4c32368af4e31de245d7ee59c0a52f25b6d9407ef23d7483aed24a9aeb5'
'866be726a53211bc55b4ca2e831dea62c9a5897bcc9844c99b21367f28577968')

# Helper macros to help make tasks easier #
apply_patch_with_msg() {
Expand Down Expand Up @@ -265,7 +269,9 @@ prepare() {
0058-Avoid-sharing-cygheaps-across-Cygwin-versions.patch \
0059-uname-report-msys2-runtime-commit-hash-too.patch \
0060-Revert-Cygwin-pipe-Restore-blocking-mode-for-cygwin-.patch \
0061-msys2-runtime-restore-fast-path-for-current-user-pri.patch
0061-msys2-runtime-restore-fast-path-for-current-user-pri.patch \
0062-fixup-Add-functionality-for-converting-UNIX-paths-in.patch \
0063-fixup-Add-functionality-for-converting-UNIX-paths-in.patch
}

build() {
Expand All @@ -288,6 +294,12 @@ build() {
# otherwise it asks git which appends "-dirty" because of our uncommited patches
CFLAGS+=" -DCYGPORT_RELEASE_INFO=${pkgver}"

# 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 "${srcdir}/msys2-runtime/winsup" && ./autogen.sh)

"${srcdir}"/msys2-runtime/configure \
Expand Down
2 changes: 1 addition & 1 deletion msys2-runtime/msys2-runtime.commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
be826601df87b13be6038bb7e23a01d92be7ef07
b039495115cdb838e2699ebb1673da471954af9c