Skip to content

Commit

Permalink
Synchronize with MSYS2's current version of the MSYS2 runtime
Browse files Browse the repository at this point in the history
Most notably, this integrates the fixes from
msys2/msys2-runtime#179.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Nov 23, 2023
1 parent a16827b commit 30b6b0e
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 6 deletions.
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 <dg0yt@darc.de>
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 <dg0yt@darc.de>
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 d4f0192..5c59291 100644
--- a/winsup/cygwin/msys2_path_conv.cc
+++ b/winsup/cygwin/msys2_path_conv.cc
@@ -431,7 +431,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);
}
@@ -458,7 +458,7 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en
} else {
return POSIX_PATH_LIST;
}
- } else if (memchr(it2, '=', end - it) == NULL) {
+ } else if (memchr(it2, '=', end - it2) == NULL) {
return SIMPLE_WINDOWS_PATH;
}
}
16 changes: 11 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'
'358b8a993127b9e45ba2468b34e2ef24b7ca9309fe76dfb37e873858c214a202')

# 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 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

0 comments on commit 30b6b0e

Please sign in to comment.