msys2-runtime: update to v3.3.4

This corresponds to https://github.com/msys2/msys2-runtime/pull/85.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin 2022-02-01 09:29:34 +01:00
parent d87e66016e
commit ff07714b85
45 changed files with 146 additions and 626 deletions

View File

@ -1,4 +1,4 @@
From 5c15d5166de1acf438ab1efba755501150dd9e17 Mon Sep 17 00:00:00 2001
From f9643916d1c8599a1ed9129e782c49ea97ffd665 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B8=CC=86=20=D0=9F?=
=?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=BE=D0=B2?= <alexey.pawlow@gmail.com>
Date: Sun, 14 Apr 2019 20:40:45 +0300

View File

@ -1,4 +1,4 @@
From ca392c50dab8af76072f33cf9aa567ae7ec3b226 Mon Sep 17 00:00:00 2001
From ca24be6425a87061467ace932ca3aa498f0fbc87 Mon Sep 17 00:00:00 2001
From: Kaleb Barrett <dev.ktbarrett@gmail.com>
Date: Sun, 14 Mar 2021 18:58:55 -0500
Subject: [PATCH 02/N] Fix msys library name in import libraries

View File

@ -1,4 +1,4 @@
From 3eed7fcf29aa61b188037bbffbc7f8a8e5eea699 Mon Sep 17 00:00:00 2001
From 7c11d96c3e9e55cc58800ed074bb844203940005 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B8=CC=86=20=D0=9F?=
=?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=BE=D0=B2?= <alexey.pawlow@gmail.com>
Date: Sun, 14 Apr 2019 21:09:17 +0300
@ -21,7 +21,7 @@ Subject: [PATCH 03/N] Rename dll from cygwin to msys
winsup/cygwin/dtable.cc | 6 ++++
winsup/cygwin/exceptions.cc | 4 +--
winsup/cygwin/fhandler_pipe.cc | 4 +++
winsup/cygwin/fhandler_tty.cc | 12 +++++++
winsup/cygwin/fhandler_tty.cc | 20 +++++++++++
winsup/cygwin/fork.cc | 2 +-
winsup/cygwin/hookapi.cc | 4 +++
winsup/cygwin/i686.din | 6 ++--
@ -52,7 +52,7 @@ Subject: [PATCH 03/N] Rename dll from cygwin to msys
winsup/utils/mingw/strace.cc | 11 +++---
winsup/utils/path.cc | 12 +++----
winsup/utils/ssp.c | 8 ++---
47 files changed, 238 insertions(+), 126 deletions(-)
47 files changed, 246 insertions(+), 126 deletions(-)
diff --git a/winsup/Makefile.am b/winsup/Makefile.am
index 067f746..932882a 100644
@ -97,7 +97,7 @@ index e101623..66272bc 100644
/* Named pipes based transport, for security on NT */
diff --git a/winsup/cygwin/Makefile.am b/winsup/cygwin/Makefile.am
index 24d7499..6a53049 100644
index 2b8e87f..5b8c255 100644
--- a/winsup/cygwin/Makefile.am
+++ b/winsup/cygwin/Makefile.am
@@ -37,15 +37,15 @@ newlib_build=$(target_builddir)/newlib
@ -122,7 +122,7 @@ index 24d7499..6a53049 100644
#
# sources
@@ -613,32 +613,32 @@ LIBSERVER = $(cygserver_blddir)/libcygserver.a
@@ -613,33 +613,33 @@ LIBSERVER = $(cygserver_blddir)/libcygserver.a
$(LIBSERVER):
$(MAKE) -C $(cygserver_blddir) libcygserver.a
@ -139,7 +139,8 @@ index 24d7499..6a53049 100644
-# cygwin dll
+# msys-2.0 dll
$(TEST_DLL_NAME): $(LDSCRIPT) dllfixdbg libdll.a $(VERSION_OFILES) $(LIBSERVER)
$(TEST_DLL_NAME): $(LDSCRIPT) dllfixdbg libdll.a $(VERSION_OFILES) $(LIBSERVER)\
$(newlib_build)/libm/libm.a $(newlib_build)/libc/libc.a
$(CXX) $(CXXFLAGS) \
-mno-use-libstdc-wrappers \
-Wl,--gc-sections -nostdlib -Wl,-T$(LDSCRIPT) -static \
@ -163,7 +164,7 @@ index 24d7499..6a53049 100644
toolopts=--cpu=@target_cpu@ --ar=@AR@ --as=@AS@ --nm=@NM@ --objcopy=@OBJCOPY@
$(DEF_FILE): gendef $(srcdir)/$(TLSOFFSETS_H) $(DIN_FILE) common.din
@@ -651,17 +651,18 @@ sigfe.s: $(DEF_FILE)
@@ -652,17 +652,18 @@ sigfe.s: $(DEF_FILE)
LIBCOS=$(addsuffix .o,$(basename $(LIB_FILES)))
$(LIB_NAME): $(DEF_FILE) $(LIBCOS) | $(TEST_DLL_NAME)
@ -185,7 +186,7 @@ index 24d7499..6a53049 100644
--exclude='(?i:dll)' \
--exclude='reloc' \
--exclude='^main$$' \
@@ -708,7 +709,7 @@ all-local: $(LIB_NAME) $(TEST_LIB_NAME) $(SUBLIBS)
@@ -709,7 +710,7 @@ all-local: $(LIB_NAME) $(TEST_LIB_NAME) $(SUBLIBS)
clean-local:
-rm -f $(BUILT_SOURCES)
-rm -f $(DEF_FILE) sigfe.s
@ -194,7 +195,7 @@ index 24d7499..6a53049 100644
-rm -f $(LIB_NAME) $(TEST_LIB_NAME) $(SUBLIBS)
-rm -f version.cc
@@ -728,6 +729,7 @@ install-libs:
@@ -729,6 +730,7 @@ install-libs:
@$(MKDIR_P) $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) $(TEST_DLL_NAME) $(DESTDIR)$(bindir)/$(DLL_NAME)
@$(MKDIR_P) $(DESTDIR)$(toollibdir)
@ -202,7 +203,7 @@ index 24d7499..6a53049 100644
(cd $(DESTDIR)$(toollibdir) && ln -sf $(LIB_NAME) libg.a)
install-headers:
@@ -750,7 +752,7 @@ install-ldif:
@@ -751,7 +753,7 @@ install-ldif:
uninstall-hook: uninstall-headers uninstall-ldif uninstall-libs
uninstall-libs:
@ -505,10 +506,10 @@ index a914110..c638044 100644
break;
}
diff --git a/winsup/cygwin/fhandler_pipe.cc b/winsup/cygwin/fhandler_pipe.cc
index 25a0922..9ce1400 100644
index 71635cc..e4b71b5 100644
--- a/winsup/cygwin/fhandler_pipe.cc
+++ b/winsup/cygwin/fhandler_pipe.cc
@@ -677,7 +677,11 @@ fhandler_pipe::close ()
@@ -676,7 +676,11 @@ fhandler_pipe::close ()
return ret;
}
@ -521,10 +522,10 @@ index 25a0922..9ce1400 100644
/* Create a pipe, and return handles to the read and write ends,
just like CreatePipe, but ensure that the write end permits
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index f523daf..42a54b6 100644
index 7bef695..10566ac 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -893,7 +893,11 @@ fhandler_pty_slave::open (int flags, mode_t)
@@ -910,7 +910,11 @@ fhandler_pty_slave::open (int flags, mode_t)
pipe_reply repl;
DWORD len;
@ -536,7 +537,19 @@ index f523daf..42a54b6 100644
&cygheap->installation_key, get_minor ());
termios_printf ("dup handles via master control pipe %s", buf);
if (!CallNamedPipe (buf, &req, sizeof req, &repl, sizeof repl,
@@ -2028,7 +2032,11 @@ fhandler_pty_master::close ()
@@ -1172,7 +1176,11 @@ fhandler_pty_slave::reset_switch_to_pcon (void)
{
char pipe[MAX_PATH];
__small_sprintf (pipe,
+#ifdef __MSYS__
+ "\\\\.\\pipe\\msys-%S-pty%d-master-ctl",
+#else
"\\\\.\\pipe\\cygwin-%S-pty%d-master-ctl",
+#endif
&cygheap->installation_key, get_minor ());
pipe_request req = { GetCurrentProcessId () };
pipe_reply repl;
@@ -2106,7 +2114,11 @@ fhandler_pty_master::close ()
pipe_reply repl;
DWORD len;
@ -546,9 +559,9 @@ index f523daf..42a54b6 100644
__small_sprintf (buf, "\\\\.\\pipe\\cygwin-%S-pty%d-master-ctl",
+#endif
&cygheap->installation_key, get_minor ());
acquire_output_mutex (INFINITE);
acquire_output_mutex (mutex_timeout);
if (master_ctl)
@@ -2883,7 +2891,11 @@ fhandler_pty_master::setup ()
@@ -3013,7 +3025,11 @@ fhandler_pty_master::setup ()
/* Create master control pipe which allows the master to duplicate
the pty pipe handles to processes which deserve it. */
@ -560,6 +573,18 @@ index f523daf..42a54b6 100644
&cygheap->installation_key, unit);
master_ctl = CreateNamedPipe (buf, PIPE_ACCESS_DUPLEX
| FILE_FLAG_FIRST_PIPE_INSTANCE,
@@ -3856,7 +3872,11 @@ fhandler_pty_slave::transfer_input (tty::xfer_dir dir, HANDLE from, tty *ttyp,
{
char pipe[MAX_PATH];
__small_sprintf (pipe,
+#ifdef __MSYS__
+ "\\\\.\\pipe\\msys-%S-pty%d-master-ctl",
+#else
"\\\\.\\pipe\\cygwin-%S-pty%d-master-ctl",
+#endif
&cygheap->installation_key, ttyp->get_minor ());
pipe_request req = { GetCurrentProcessId () };
pipe_reply repl;
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index 7192178..0fe112f 100644
--- a/winsup/cygwin/fork.cc
@ -672,7 +697,7 @@ index 56b4363..6bc948a 100644
#endif /* __CYGWIN_CYGWIN_DLL_H__ */
diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h
index ef8c1e2..29d404f 100644
index 8625512..d783447 100644
--- a/winsup/cygwin/include/cygwin/version.h
+++ b/winsup/cygwin/include/cygwin/version.h
@@ -533,7 +533,11 @@ details. */

View File

@ -1,4 +1,4 @@
From 35991fee287d1c40bc50857e943f6eb1b6ed9372 Mon Sep 17 00:00:00 2001
From 7aa11f8cc8691e1eb22ed7ae565b6d9678ba3d9e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B8=CC=86=20=D0=9F?=
=?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=BE=D0=B2?= <alexey.pawlow@gmail.com>
Date: Sun, 14 Apr 2019 21:17:46 +0300
@ -22,7 +22,7 @@ Subject: [PATCH 04/N] Add functionality for converting UNIX paths in
create mode 100644 winsup/cygwin/msys2_path_conv.h
diff --git a/winsup/cygwin/Makefile.am b/winsup/cygwin/Makefile.am
index 6a53049..f10b1b5 100644
index 5b8c255..8002714 100644
--- a/winsup/cygwin/Makefile.am
+++ b/winsup/cygwin/Makefile.am
@@ -283,6 +283,7 @@ DLL_FILES= \
@ -109,7 +109,7 @@ index 74413a8..6adf620 100644
if (envp)
diff --git a/winsup/cygwin/include/sys/cygwin.h b/winsup/cygwin/include/sys/cygwin.h
index 805671e..b395e96 100644
index ac55ab0..b410cbe 100644
--- a/winsup/cygwin/include/sys/cygwin.h
+++ b/winsup/cygwin/include/sys/cygwin.h
@@ -83,6 +83,12 @@ extern ssize_t cygwin_conv_path_list (cygwin_conv_path_t what, const void *from,
@ -926,7 +926,7 @@ index 0000000..67d85ec
+#endif /* end of include guard: PATH_CONV_H_DB4IQBH3 */
+
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index baf04ce..5a3aa9b 100644
index 87ac240..fe3df12 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -66,6 +66,7 @@
@ -937,7 +937,7 @@ index baf04ce..5a3aa9b 100644
#undef basename
suffix_info stat_suffixes[] =
@@ -3768,6 +3769,74 @@ fchdir (int fd)
@@ -3818,6 +3819,74 @@ fchdir (int fd)
return res;
}
@ -1013,10 +1013,10 @@ index baf04ce..5a3aa9b 100644
/* Cover functions to the path conversion routines.
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index e160fa3..63c5d24 100644
index 81dba5a..1af1f3d 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -295,6 +295,27 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
@@ -297,6 +297,27 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
}
}
@ -1044,7 +1044,7 @@ index e160fa3..63c5d24 100644
/* Check if we have been called from exec{lv}p or spawn{lv}p and mask
mode to keep only the spawn mode. */
bool p_type_exec = !!(mode & _P_PATH_TYPE_EXEC);
@@ -404,9 +425,23 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
@@ -406,9 +427,23 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
moreinfo->argc = newargv.argc;
moreinfo->argv = newargv;
}
@ -1070,7 +1070,7 @@ index e160fa3..63c5d24 100644
{
res = -1;
__leave;
@@ -540,7 +575,8 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
@@ -542,7 +577,8 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
moreinfo->envp = build_env (envp, envblock, moreinfo->envc,
real_path.iscygexec (),
switch_user ? ::cygheap->user.primary_token ()

View File

@ -1,4 +1,4 @@
From e03a663f96841bb83b2f139ca2a7ca6eb11f72a9 Mon Sep 17 00:00:00 2001
From 3d15b852e5046a1bc395873959902fd084050c76 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B8=CC=86=20=D0=9F?=
=?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=BE=D0=B2?= <alexey.pawlow@gmail.com>
Date: Sun, 14 Apr 2019 21:29:01 +0300

View File

@ -1,4 +1,4 @@
From 4cdd9aa916c516f92219a01b6a03ef4213bd9ccd Mon Sep 17 00:00:00 2001
From d47a06e488ca5e9c40b10659833358118b2ba83c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B8=CC=86=20=D0=9F?=
=?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=BE=D0=B2?= <alexey.pawlow@gmail.com>
Date: Sun, 14 Apr 2019 21:45:06 +0300

View File

@ -1,4 +1,4 @@
From 62230a69b19a5b70807de0d372bba6a02e3218f9 Mon Sep 17 00:00:00 2001
From a670005c0cfae22dad92c741818efc029e98ba55 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B8=CC=86=20=D0=9F?=
=?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=BE=D0=B2?= <alexey.pawlow@gmail.com>
Date: Sun, 14 Apr 2019 21:47:21 +0300
@ -61,7 +61,7 @@ index 48fb312..72e8f8f 100644
bool NO_COPY in_forkee;
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 5a3aa9b..f4a0881 100644
index fe3df12..c9876c5 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -1682,6 +1682,89 @@ conv_path_list (const char *src, char *dst, size_t size,

View File

@ -1,4 +1,4 @@
From 5c2e91ef1488e164a6d0bc941842a23717f9df8d Mon Sep 17 00:00:00 2001
From fc13a82e72e42ea65e3baf0fb89e1cf08277a9ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B8=CC=86=20=D0=9F?=
=?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=BE=D0=B2?= <alexey.pawlow@gmail.com>
Date: Sun, 14 Apr 2019 21:48:54 +0300

View File

@ -1,4 +1,4 @@
From 5dfe4233a530def97a32579e44900394e9d8cb87 Mon Sep 17 00:00:00 2001
From 54d87bc5f723a16f96be62e9e817c7cfe2552ac6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B8=CC=86=20=D0=9F?=
=?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=BE=D0=B2?= <alexey.pawlow@gmail.com>
Date: Sun, 14 Apr 2019 21:50:55 +0300
@ -10,10 +10,10 @@ Strace is a Windows program so MSYS2 will convert all arguments and environment
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 63c5d24..6c4922b 100644
index 1af1f3d..cc2e030 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -572,11 +572,13 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
@@ -574,11 +574,13 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
bool switch_user = ::cygheap->user.issetuid ()
&& (::cygheap->user.saved_uid
!= ::cygheap->user.real_uid);

View File

@ -1,4 +1,4 @@
From 33dd3a5a56ca8cb86bfa757625f70a9ef6ef9a80 Mon Sep 17 00:00:00 2001
From 3707c635b371d96e243a3a19df1fb6d6aed73db7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B8=CC=86=20=D0=9F?=
=?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=BE=D0=B2?= <alexey.pawlow@gmail.com>
Date: Sun, 14 Apr 2019 22:13:51 +0300
@ -10,7 +10,7 @@ Subject: [PATCH 10/N] Special case for converting root directory to have
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index f4a0881..d7500af 100644
index c9876c5..7f7ded4 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -709,6 +709,12 @@ path_conv::check (const char *src, unsigned opt,

View File

@ -1,4 +1,4 @@
From 1fdc45c4da7645e2eb13e2b53ccc72041d78c7f2 Mon Sep 17 00:00:00 2001
From 110b516ad61b31a417aee12305379ca6ddcd8172 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Fri, 21 Aug 2015 12:52:09 +0100
Subject: [PATCH 11/N] dcrt0.cc: Untangle allow_glob from winshell

View File

@ -1,4 +1,4 @@
From 9b81d20086e3e8bd8ba1494c315fdef0307daee8 Mon Sep 17 00:00:00 2001
From 1ed5efd950a19f75d4d36644ae996dae8aa8f1b4 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Mon, 24 Aug 2015 00:48:06 +0100
Subject: [PATCH 12/N] dcrt0.cc (globify): Don't quote literal strings

View File

@ -1,4 +1,4 @@
From b1f05f3ba70a08a92bf8e9d3258450b769219c6a Mon Sep 17 00:00:00 2001
From 2336464e19637eabc4e4c7cbbf9962a409d88f22 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Sun, 23 Aug 2015 20:47:30 +0100
Subject: [PATCH 13/N] strace.cc: Don't set MSYS=noglob

View File

@ -1,4 +1,4 @@
From fb1561445bd065d2a5759b3a2d103b722b144482 Mon Sep 17 00:00:00 2001
From eede69db25295d637864a1c6d8da1fa5811472b8 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Fri, 21 Aug 2015 12:18:52 +0100
Subject: [PATCH 14/N] Add debugging for build_argv

View File

@ -1,4 +1,4 @@
From a34872bc4d364c46bee97942496330ed13a64a01 Mon Sep 17 00:00:00 2001
From 72a34b304df327550972ed21d6dbf4f396060b69 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Fri, 21 Aug 2015 09:52:47 +0100
Subject: [PATCH 15/N] Add debugging for strace make_command_line

View File

@ -1,4 +1,4 @@
From abe86aa09954bc36acf9b4969bd3738f22865850 Mon Sep 17 00:00:00 2001
From 125291daa27cff1eedb991e740933cc64cb052ea Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Sun, 10 Apr 2016 21:47:41 +0100
Subject: [PATCH 16/N] environ.cc: New facility/environment variable
@ -130,10 +130,10 @@ index 47cef6f..b3d1a6b 100644
extern inline void
transform_chars (PUNICODE_STRING upath, USHORT start_idx)
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index d7500af..859ae3e 100644
index 7f7ded4..88fd815 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -3949,7 +3949,6 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions,
@@ -3999,7 +3999,6 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions,
return arg_result;
}
@ -142,10 +142,10 @@ index d7500af..859ae3e 100644
{
/* Since we've got regex linked we should maybe switch to that, but
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 6c4922b..83992b4 100644
index cc2e030..abe7b60 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -296,8 +296,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
@@ -298,8 +298,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
}
/* Environment variable MSYS2_ARG_CONV_EXCL contains a list
@ -155,7 +155,7 @@ index 6c4922b..83992b4 100644
A value of * means don't convert any arguments. */
char* msys2_arg_conv_excl_env = getenv("MSYS2_ARG_CONV_EXCL");
char* msys2_arg_conv_excl = NULL;
@@ -306,14 +305,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
@@ -308,14 +307,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
{
msys2_arg_conv_excl = (char*)alloca (strlen(msys2_arg_conv_excl_env)+1);
strcpy (msys2_arg_conv_excl, msys2_arg_conv_excl_env);

View File

@ -1,4 +1,4 @@
From e816b77b33b38805aebf570f175c69a74534056b Mon Sep 17 00:00:00 2001
From a4090bf778884272effb36a9f98716cac2b03efb Mon Sep 17 00:00:00 2001
From: SquallATF <squallatf@gmail.com>
Date: Mon, 10 Sep 2018 11:32:18 +0300
Subject: [PATCH 17/N] Fix native symbolic link spawn passing wrong arg0
@ -8,7 +8,7 @@ Subject: [PATCH 17/N] Fix native symbolic link spawn passing wrong arg0
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 83992b4..ca64434 100644
index abe7b60..698cf8f 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -50,7 +50,7 @@ perhaps_suffix (const char *prog, path_conv& buf, int& err, unsigned opt)

View File

@ -1,4 +1,4 @@
From da43030d3aa5d1552a3f22790103fe0801627b01 Mon Sep 17 00:00:00 2001
From 57c449341d42fe769d8b6bcc19d13201ff1bf777 Mon Sep 17 00:00:00 2001
From: Alexey Pavlov <alexpux@gmail.com>
Date: Fri, 24 May 2019 13:41:47 +0300
Subject: [PATCH 18/N] QueryUnbiasedInterruptTime must be load from

View File

@ -1,4 +1,4 @@
From 2d8cdeeaab0fbf95dba264a29dd247449e6620b4 Mon Sep 17 00:00:00 2001
From e893c7b58cea345181f2621e0aa36392764471ea Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <johannes.schindelin@gmx.de>
Date: Wed, 17 May 2017 18:13:32 +0200
Subject: [PATCH 19/N] strace --quiet: be *really* quiet

View File

@ -1,4 +1,4 @@
From 89387724036bbf45d08ccb01ce96d5d96dfedbe1 Mon Sep 17 00:00:00 2001
From 83ef4040f5983de74b2c873ac5185ad2f340dad3 Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <johannes.schindelin@gmx.de>
Date: Tue, 19 May 2020 13:24:55 +0200
Subject: [PATCH 20/N] Default to `disable_pcon`

View File

@ -1,4 +1,4 @@
From 9e8008135448ce141c578fa3fbfd0e7c8814cba4 Mon Sep 17 00:00:00 2001
From c2726e74a894e75c47e6078831eba03e3f83ce26 Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <johannes.schindelin@gmx.de>
Date: Tue, 19 May 2020 13:49:37 +0200
Subject: [PATCH 21/N] Introduce the `enable_pcon` value for `MSYS`

View File

@ -1,4 +1,4 @@
From 83ec4066ef81710ceb5d9dc9a7019c75d623a628 Mon Sep 17 00:00:00 2001
From 055a8a31e23b7382636c4bdf61a4a38dcd6fb176 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Fri, 5 Jun 2020 20:09:11 +0200
Subject: [PATCH 22/N] popen: call /usr/bin/sh instead of /bin/sh

View File

@ -1,4 +1,4 @@
From a99dc3eaa0c0b17745c66f8e323c5d57b4aba496 Mon Sep 17 00:00:00 2001
From b4f09af08e12d76b92e97d2e8a53ad313bd8998c Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Sun, 9 Aug 2020 14:02:51 +0200
Subject: [PATCH 23/N] CI: add a GHA for doing a basic build test
@ -10,7 +10,7 @@ Subject: [PATCH 23/N] CI: add a GHA for doing a basic build test
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
new file mode 100644
index 0000000..8b0817c
index 0000000..4e1d498
--- /dev/null
+++ b/.github/workflows/build.yaml
@@ -0,0 +1,36 @@
@ -31,7 +31,7 @@ index 0000000..8b0817c
+ with:
+ msystem: MSYS
+ update: true
+ install: msys2-devel base-devel cocom diffutils gcc gettext-devel libiconv-devel make mingw-w64-cross-crt mingw-w64-cross-gcc mingw-w64-cross-zlib perl zlib-devel
+ install: msys2-devel base-devel autotools cocom diffutils gcc gettext-devel libiconv-devel make mingw-w64-cross-crt mingw-w64-cross-gcc mingw-w64-cross-zlib perl zlib-devel xmlto docbook-xsl
+
+ - name: Build
+ shell: msys2 {0}

View File

@ -1,4 +1,4 @@
From f9e55f3766f90b9a393ab0394722cd48055a55e4 Mon Sep 17 00:00:00 2001
From c4438da53f45d28057df9b224c601ea1a35977ec Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <johannes.schindelin@gmx.de>
Date: Fri, 22 Nov 2019 11:20:22 +0100
Subject: [PATCH 24/N] Set up a GitHub Action to keep in sync with Cygwin

View File

@ -1,4 +1,4 @@
From 4ca6df7d5455922de1b8e62c7fbc6a29301c40e6 Mon Sep 17 00:00:00 2001
From 7bafcb508292f6fb4cb083b2f20de8c38468f8eb Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <johannes.schindelin@gmx.de>
Date: Wed, 12 Aug 2020 12:22:38 +0200
Subject: [PATCH 25/N] Expose full command-lines to other Win32 processes by

View File

@ -1,4 +1,4 @@
From cec4a1da1426ae4081b936278419988599b70d53 Mon Sep 17 00:00:00 2001
From cd01859899187b626ba0c3ccd4a322622d438c10 Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <johannes.schindelin@gmx.de>
Date: Wed, 17 Mar 2021 17:41:02 +0100
Subject: [PATCH 26/N] Disable the 'cygwin' GitHub workflow

View File

@ -1,4 +1,4 @@
From 8fca9906ba4d707af10cd6b750c5ff3f319e406a Mon Sep 17 00:00:00 2001
From 32be09faa66e3506cb51e51a9c7e26fb4d548934 Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <johannes.schindelin@gmx.de>
Date: Wed, 31 Mar 2021 11:38:41 +0200
Subject: [PATCH 27/N] Do not show Error dialogs by default
@ -51,10 +51,10 @@ index 7d82f80..a9c7e1c 100644
bool NO_COPY in_forkee;
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index ca64434..6e142a1 100644
index 698cf8f..d7ee5fe 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -462,7 +462,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
@@ -464,7 +464,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
get the default error mode instead of inheriting the mode Cygwin
uses. This allows things like Windows Error Reporting/JIT debugging
to work with processes launched from a Cygwin shell. */

View File

@ -1,4 +1,4 @@
From ceceb60023fd1cfd684ed859561db5651decec3e Mon Sep 17 00:00:00 2001
From 1d6275df3797edd823333f72163537d65bfa5816 Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <johannes.schindelin@gmx.de>
Date: Mon, 16 Apr 2018 14:59:39 +0200
Subject: [PATCH 28/N] Add a helper to obtain a function's address in

View File

@ -1,4 +1,4 @@
From dfae2ddcf6f412d6dc216515c5972a3393b62c0c Mon Sep 17 00:00:00 2001
From eab174266ee10ff0c2b6612ffcfdaba4557c6111 Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <johannes.schindelin@gmx.de>
Date: Fri, 20 Mar 2015 09:56:28 +0000
Subject: [PATCH 29/N] Emulate GenerateConsoleCtrlEvent() upon Ctrl+C

View File

@ -1,4 +1,4 @@
From 0905fe0cf3b9ac72e744f0ebf54fd35325052cf5 Mon Sep 17 00:00:00 2001
From fc51dc797b78217ca727bf9cb4accd37573d34f8 Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <johannes.schindelin@gmx.de>
Date: Fri, 20 Mar 2015 10:01:50 +0000
Subject: [PATCH 30/N] kill: kill Win32 processes more gently

View File

@ -1,4 +1,4 @@
From 9128b4ba7c0634471a724643ee4e7df5a77ce8ac Mon Sep 17 00:00:00 2001
From ab1bb9b981d6d12fce16d86d808f7e99735a457e Mon Sep 17 00:00:00 2001
From: Jeremy Drake <github@jdrake.com>
Date: Thu, 22 Jul 2021 11:59:16 -0700
Subject: [PATCH 31/N] Cygwin: make option for native inner link handling.
@ -37,10 +37,10 @@ index a9c7e1c..6faf38d 100644
bool NO_COPY in_forkee;
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 859ae3e..3f24217 100644
index 88fd815..ca65127 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -3644,7 +3644,8 @@ restart:
@@ -3645,7 +3645,8 @@ restart:
goto file_not_symlink;
}
#endif /* __i386__ */

View File

@ -1,4 +1,4 @@
From a04387a79df4cb44e4caa150e3d84edc0e959bd8 Mon Sep 17 00:00:00 2001
From 0a97711e0b9fbdcfc3015829eb5ea7851fee376c Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <johannes.schindelin@gmx.de>
Date: Mon, 8 Nov 2021 14:20:07 +0100
Subject: [PATCH 32/N] docs: skip building texinfo and PDF files

View File

@ -1,4 +1,4 @@
From 27276c6ba0443413bff727a180a8d572eb8c7fd2 Mon Sep 17 00:00:00 2001
From 49847239192f7af25b550a4280c20bf4810084bd Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <johannes.schindelin@gmx.de>
Date: Mon, 8 Nov 2021 16:22:57 +0100
Subject: [PATCH 33/N] install-libs: depend on the "toollibs"
@ -14,10 +14,10 @@ Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winsup/cygwin/Makefile.am b/winsup/cygwin/Makefile.am
index f10b1b5..27ee986 100644
index 8002714..d1d6116 100644
--- a/winsup/cygwin/Makefile.am
+++ b/winsup/cygwin/Makefile.am
@@ -726,7 +726,7 @@ man_MANS = regex/regex.3 regex/regex.7
@@ -727,7 +727,7 @@ man_MANS = regex/regex.3 regex/regex.7
install-exec-hook: install-libs
install-data-local: install-headers install-ldif

View File

@ -1,7 +1,7 @@
From 390150d2b9f9bfbdccfa273a32c725fd2ad19190 Mon Sep 17 00:00:00 2001
From 648860426f2e8e81edd5f0c24348653dca0d421f Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <johannes.schindelin@gmx.de>
Date: Mon, 23 Nov 2015 20:03:11 +0100
Subject: [PATCH 40/N] POSIX-ify the SHELL variable
Subject: [PATCH 34/N] POSIX-ify the SHELL variable
When calling a non-MSys2 binary, all of the environment is converted from
POSIX to Win32, including the SHELL environment variable. In Git for

View File

@ -1,44 +0,0 @@
From 3c59227031819323a7657fe29ccaca4c3e1ce4f9 Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <johannes.schindelin@gmx.de>
Date: Wed, 8 Dec 2021 23:57:08 +0100
Subject: [PATCH 34/N] fixup! Rename dll from cygwin to msys
These two instances of pty pipes have been forgotten somewhere along the
lines.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
winsup/cygwin/fhandler_tty.cc | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 42a54b6..aeca0cb 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -1153,7 +1153,11 @@ fhandler_pty_slave::reset_switch_to_pcon (void)
{
char pipe[MAX_PATH];
__small_sprintf (pipe,
+#ifdef __MSYS__
+ "\\\\.\\pipe\\msys-%S-pty%d-master-ctl",
+#else
"\\\\.\\pipe\\cygwin-%S-pty%d-master-ctl",
+#endif
&cygheap->installation_key, get_minor ());
pipe_request req = { GetCurrentProcessId () };
pipe_reply repl;
@@ -3738,7 +3742,11 @@ fhandler_pty_slave::transfer_input (tty::xfer_dir dir, HANDLE from, tty *ttyp,
{
char pipe[MAX_PATH];
__small_sprintf (pipe,
+#ifdef __MSYS__
+ "\\\\.\\pipe\\msys-%S-pty%d-master-ctl",
+#else
"\\\\.\\pipe\\cygwin-%S-pty%d-master-ctl",
+#endif
&cygheap->installation_key, ttyp->get_minor ());
pipe_request req = { GetCurrentProcessId () };
pipe_reply repl;
--
2.34.1

View File

@ -1,70 +0,0 @@
From eb5547505a855821e58a373642958ffc9bfe8402 Mon Sep 17 00:00:00 2001
From: Takashi Yano <takashi.yano@nifty.ne.jp>
Date: Fri, 10 Dec 2021 19:20:40 +0900
Subject: [PATCH 35/N] Cygwin: pty: fix bug in reduced input transfer
When launching an MSYS2 process via a non-MSYS2 process, the response
for, say, a CSI [ 6n (Device Status Report) sent from that MSYS2 process
was sometimes not sent (or sent only partially) to the process but to
the terminal instead.
This regression was introduced in f206417894 (Cygwin: pty: Reduce
unecessary input transfer., 2021-02-11).
While it is not yet completely clear why, this patch fixes this. The
explanation is left for the commit message that Takashi will craft for
the Cygwin project, but we will take this patch early into the MSYS2/Git
for Windows projects.
This addresses https://github.com/git-for-windows/git/issues/3579
---
winsup/cygwin/fhandler_tty.cc | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index aeca0cb..b8a40ae 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -1247,10 +1247,13 @@ fhandler_pty_slave::mask_switch_to_pcon_in (bool mask, bool xfer)
else if (InterlockedDecrement (&num_reader) == 0)
CloseHandle (slave_reading);
+ bool need_xfer =
+ get_ttyp ()->switch_to_pcon_in && !get_ttyp ()->pcon_activated;
+
/* In GDB, transfer input based on setpgid() does not work because
GDB may not set terminal process group properly. Therefore,
transfer input here if isHybrid is set. */
- if (isHybrid && !!masked != mask && xfer
+ if ((isHybrid || need_xfer) && !!masked != mask && xfer
&& GetStdHandle (STD_INPUT_HANDLE) == get_handle ())
{
if (mask && get_ttyp ()->pcon_input_state_eq (tty::to_nat))
@@ -1544,7 +1547,7 @@ out:
if (ptr0)
{ /* Not tcflush() */
bool saw_eol = totalread > 0 && strchr ("\r\n", ptr0[totalread -1]);
- mask_switch_to_pcon_in (false, saw_eol);
+ mask_switch_to_pcon_in (false, saw_eol || len == 0);
}
}
@@ -2226,6 +2229,15 @@ fhandler_pty_master::write (const void *ptr, size_t len)
return len;
}
+ if (to_be_read_from_pcon () && !get_ttyp ()->pcon_activated
+ && get_ttyp ()->pcon_input_state == tty::to_cyg)
+ {
+ WaitForSingleObject (input_mutex, INFINITE);
+ fhandler_pty_slave::transfer_input (tty::to_nat, from_master,
+ get_ttyp (), input_available_event);
+ ReleaseMutex (input_mutex);
+ }
+
line_edit_status status = line_edit (p, len, ti, &ret);
if (status > line_edit_signalled && status != line_edit_pipe_full)
ret = -1;
--
2.34.1

View File

@ -1,7 +1,7 @@
From c04503a3e1a989a2655d832cad29b9ccd4f82f15 Mon Sep 17 00:00:00 2001
From c0250d576e39d603248d10e7bb2f396c9bc6a56c Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <johannes.schindelin@gmx.de>
Date: Tue, 21 Mar 2017 13:18:38 +0100
Subject: [PATCH 41/N] Handle ORIGINAL_PATH just like PATH
Subject: [PATCH 35/N] Handle ORIGINAL_PATH just like PATH
MSYS2 recently introduced that hack where the ORIGINAL_PATH variable is
set to the original PATH value in /etc/profile, unless previously set.

View File

@ -1,70 +0,0 @@
From 0efcde460df9c5d7e7e4bc52bc134a817a8c33aa Mon Sep 17 00:00:00 2001
From: Takashi Yano <takashi.yano@nifty.ne.jp>
Date: Wed, 8 Dec 2021 20:15:45 +0900
Subject: [PATCH 36/N] Cygwin: path: Convert UNC path prefix back to drive
letter.
- When symlink_info::check() is called with the path having drive
letter and UNC path is mounted to the drive, the path is replaced
with UNC path. With this patch, UNC path prefix is converted back
to drive letter. This fixes the issue:
https://cygwin.com/pipermail/cygwin/2021-November/250087.html
https://cygwin.com/pipermail/cygwin/2021-December/250103.html
---
winsup/cygwin/path.cc | 37 ++++++++++++++++++++++++++++++++++++-
1 file changed, 36 insertions(+), 1 deletion(-)
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 3f24217..06b26d2 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -3655,10 +3655,45 @@ restart:
{
UNICODE_STRING fpath;
- RtlInitCountedUnicodeString (&fpath, fpbuf, ret * sizeof (WCHAR));
+ /* If incoming path has no trailing backslash, but final path
+ has one, drop trailing backslash from final path so the
+ below string comparison has a chance to succeed. */
+ if (upath.Buffer[(upath.Length - 1) / sizeof (WCHAR)] != L'\\'
+ && fpbuf[ret - 1] == L'\\')
+ fpbuf[--ret] = L'\0';
fpbuf[1] = L'?'; /* \\?\ --> \??\ */
+ RtlInitCountedUnicodeString (&fpath, fpbuf, ret * sizeof (WCHAR));
if (!RtlEqualUnicodeString (&upath, &fpath, !!ci_flag))
{
+ /* Check if the final path is an UNC path and the incoming
+ path isn't. If so... */
+ if (RtlEqualUnicodePathPrefix (&fpath, &ro_u_uncp, TRUE)
+ && !RtlEqualUnicodePathPrefix (&upath, &ro_u_uncp, TRUE))
+ {
+ /* ...get the remote path from the volume path name,
+ replace remote path with drive letter, check again. */
+ WCHAR remote[MAX_PATH];
+
+ fpbuf[1] = L'\\';
+ BOOL r = GetVolumePathNameW (fpbuf, remote, MAX_PATH);
+ fpbuf[1] = L'?';
+ if (r)
+ {
+ int remlen = wcslen (remote);
+ if (remote[remlen - 1] == L'\\')
+ remlen--;
+ /* Hackfest */
+ fpath.Buffer[4] = upath.Buffer[4]; /* Drive letter */
+ fpath.Buffer[5] = L':';
+ WCHAR *to = fpath.Buffer + 6;
+ WCHAR *from = to + remlen - 6;
+ memmove (to, from,
+ (wcslen (from) + 1) * sizeof (WCHAR));
+ fpath.Length -= (from - to) * sizeof (WCHAR);
+ if (RtlEqualUnicodeString (&upath, &fpath, !!ci_flag))
+ goto file_not_symlink;
+ }
+ }
issymlink = true;
/* upath.Buffer is big enough and unused from this point on.
Reuse it here, avoiding yet another buffer allocation. */
--
2.34.1

View File

@ -1,85 +0,0 @@
From 2480c0e3242665890e1dac01891c5a7834fdd138 Mon Sep 17 00:00:00 2001
From: Takashi Yano <takashi.yano@nifty.ne.jp>
Date: Thu, 9 Dec 2021 17:15:23 +0900
Subject: [PATCH 37/N] Cygwin: path: Fix path conversion of virtual drive.
- The last change in path.cc introduced a bug that causes an error
when accessing a virtual drive which mounts UNC path such as
"\\server\share\dir" rather than "\\server\share". This patch
fixes the issue.
---
winsup/cygwin/path.cc | 56 +++++++++++++++++++++++++++----------------
1 file changed, 35 insertions(+), 21 deletions(-)
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 06b26d2..36f15bd 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -3670,29 +3670,43 @@ restart:
if (RtlEqualUnicodePathPrefix (&fpath, &ro_u_uncp, TRUE)
&& !RtlEqualUnicodePathPrefix (&upath, &ro_u_uncp, TRUE))
{
- /* ...get the remote path from the volume path name,
- replace remote path with drive letter, check again. */
+ /* ...get the remote path, replace remote path
+ with drive letter, check again. */
+ WCHAR drive[3] =
+ {(WCHAR) towupper (upath.Buffer[4]), L':', L'\0'};
WCHAR remote[MAX_PATH];
- fpbuf[1] = L'\\';
- BOOL r = GetVolumePathNameW (fpbuf, remote, MAX_PATH);
- fpbuf[1] = L'?';
- if (r)
- {
- int remlen = wcslen (remote);
- if (remote[remlen - 1] == L'\\')
- remlen--;
- /* Hackfest */
- fpath.Buffer[4] = upath.Buffer[4]; /* Drive letter */
- fpath.Buffer[5] = L':';
- WCHAR *to = fpath.Buffer + 6;
- WCHAR *from = to + remlen - 6;
- memmove (to, from,
- (wcslen (from) + 1) * sizeof (WCHAR));
- fpath.Length -= (from - to) * sizeof (WCHAR);
- if (RtlEqualUnicodeString (&upath, &fpath, !!ci_flag))
- goto file_not_symlink;
- }
+
+ int remlen = QueryDosDeviceW (drive, remote, MAX_PATH);
+ if (remlen < 3)
+ goto file_not_symlink; /* fallback */
+ remlen -= 2;
+
+ if (remote[remlen - 1] == L'\\')
+ remlen--;
+ WCHAR *p;
+ UNICODE_STRING rpath;
+ RtlInitCountedUnicodeString (&rpath, remote,
+ remlen * sizeof (WCHAR));
+ if (RtlEqualUnicodePathPrefix (&rpath, &ro_u_uncp, TRUE))
+ remlen -= 6;
+ else if ((p = wcschr (remote, L';'))
+ && p + 3 < remote + remlen
+ && wcsncmp (p + 1, drive, 2) == 0
+ && (p = wcschr (p + 3, L'\\')))
+ remlen -= p - remote - 1;
+ else
+ goto file_not_symlink; /* fallback */
+ /* Hackfest */
+ fpath.Buffer[4] = drive[0]; /* Drive letter */
+ fpath.Buffer[5] = L':';
+ WCHAR *to = fpath.Buffer + 6;
+ WCHAR *from = to + remlen;
+ memmove (to, from,
+ (wcslen (from) + 1) * sizeof (WCHAR));
+ fpath.Length -= (from - to) * sizeof (WCHAR);
+ if (RtlEqualUnicodeString (&upath, &fpath, !!ci_flag))
+ goto file_not_symlink;
}
issymlink = true;
/* upath.Buffer is big enough and unused from this point on.
--
2.34.1

View File

@ -1,26 +0,0 @@
From f2fd51bcb843ff44060b941e5f1b58f97b134a14 Mon Sep 17 00:00:00 2001
From: jeremyd2019 <github@jdrake.com>
Date: Wed, 22 Dec 2021 19:17:32 -0800
Subject: [PATCH 38/N] fixup! CI: add a GHA for doing a basic build test
CI now needs to depend on autotools
---
.github/workflows/build.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 8b0817c..8c8fd3e 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -15,7 +15,7 @@ jobs:
with:
msystem: MSYS
update: true
- install: msys2-devel base-devel cocom diffutils gcc gettext-devel libiconv-devel make mingw-w64-cross-crt mingw-w64-cross-gcc mingw-w64-cross-zlib perl zlib-devel
+ install: msys2-devel base-devel autotools cocom diffutils gcc gettext-devel libiconv-devel make mingw-w64-cross-crt mingw-w64-cross-gcc mingw-w64-cross-zlib perl zlib-devel
- name: Build
shell: msys2 {0}
--
2.34.1

View File

@ -1,65 +0,0 @@
From e4fbec279b49055a139a8f26ab4601ea30064e2d Mon Sep 17 00:00:00 2001
From: Ken Brown <kbrown@cornell.edu>
Date: Sun, 26 Dec 2021 16:42:26 -0500
Subject: [PATCH 39/N] Cygwin: fhandler_pipe::get_query_hdl_per_process: avoid
a crash
NtQueryInformationProcess(ProcessHandleInformation) can return
STATUS_SUCCESS with invalid handle data for certain processes
("minimal" processes on Windows 10). This can cause a crash when
there's an attempt to access that data. Fix that by setting
NumberOfHandles to zero before calling NtQueryInformationProcess.
Addresses: https://cygwin.com/pipermail/cygwin-patches/2021q4/011611.html
---
winsup/cygwin/fhandler_pipe.cc | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/fhandler_pipe.cc b/winsup/cygwin/fhandler_pipe.cc
index 9ce1400..e4b71b5 100644
--- a/winsup/cygwin/fhandler_pipe.cc
+++ b/winsup/cygwin/fhandler_pipe.cc
@@ -6,8 +6,6 @@ This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
-/* FIXME: Should this really be fhandler_pipe.cc? */
-
#include "winsup.h"
#include <stdlib.h>
#include <sys/socket.h>
@@ -20,6 +18,7 @@ details. */
#include "pinfo.h"
#include "shared_info.h"
#include "tls_pbuf.h"
+#include <assert.h>
/* This is only to be used for writing. When reading,
STATUS_PIPE_EMPTY simply means there's no data to be read. */
@@ -1260,6 +1259,12 @@ fhandler_pipe::get_query_hdl_per_process (WCHAR *name,
HeapAlloc (GetProcessHeap (), 0, nbytes);
if (!phi)
goto close_proc;
+ /* NtQueryInformationProcess can return STATUS_SUCCESS with
+ invalid handle data for certain processes. See
+ https://github.com/processhacker/processhacker/blob/05f5e9fa477dcaa1709d9518170d18e1b3b8330d/phlib/native.c#L5754.
+ We need to ensure that NumberOfHandles is zero in this
+ case to avoid a crash in the for loop below. */
+ phi->NumberOfHandles = 0;
status = NtQueryInformationProcess (proc, ProcessHandleInformation,
phi, nbytes, &len);
if (NT_SUCCESS (status))
@@ -1271,6 +1276,10 @@ fhandler_pipe::get_query_hdl_per_process (WCHAR *name,
if (!NT_SUCCESS (status))
goto close_proc;
+ /* Sanity check in case Microsoft changes
+ NtQueryInformationProcess and the initialization of
+ NumberOfHandles above is no longer sufficient. */
+ assert (phi->NumberOfHandles <= n_handle);
for (ULONG j = 0; j < phi->NumberOfHandles; j++)
{
/* Check for the peculiarity of cygwin read pipe */
--
2.34.1

View File

@ -1,28 +0,0 @@
From 08e8d57dd895d229ab5b6ad2a17eee8696772e1c Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <johannes.schindelin@gmx.de>
Date: Wed, 5 Jan 2022 15:23:47 +0100
Subject: [PATCH 42/N] fixup! CI: add a GHA for doing a basic build test
The `xmlto` command is also used, as well as the style sheets of docbook.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
.github/workflows/build.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 8c8fd3e..4e1d498 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -15,7 +15,7 @@ jobs:
with:
msystem: MSYS
update: true
- install: msys2-devel base-devel autotools cocom diffutils gcc gettext-devel libiconv-devel make mingw-w64-cross-crt mingw-w64-cross-gcc mingw-w64-cross-zlib perl zlib-devel
+ install: msys2-devel base-devel autotools cocom diffutils gcc gettext-devel libiconv-devel make mingw-w64-cross-crt mingw-w64-cross-gcc mingw-w64-cross-zlib perl zlib-devel xmlto docbook-xsl
- name: Build
shell: msys2 {0}
--
2.34.1

View File

@ -1,52 +0,0 @@
From 576eff4d56dcac441fcc56ff59966e66f9e0f9b9 Mon Sep 17 00:00:00 2001
From: Corinna Vinschen <corinna@vinschen.de>
Date: Wed, 12 Jan 2022 11:57:35 +0100
Subject: [PATCH 43/N] posix_spawn: fix get/set uid/gid calls for 32 bit
Cygwin
32 bit Cygwin still exports function calls to support old applications.
E. g., when switching from 16 to 32 bit uid/gid values, new function
like getuid32 have been added and the old getuid function still only
provides 16 bit values. Newly built applications using getuid are
actually calling getuid32.
However, this link magic isn't performed inside Cygwin itself, so if
newlib functions call getuid, they actually call the old getuid, not
the new getuid32. This leads to truncated uid/gid values.
https://cygwin.com/pipermail/cygwin/2022-January/250453.html reports
how this leads to problems in posix_spawn.
Fix this temporarily. i686 support will go away soon in Cygwin and the
fix can be dropped.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
---
newlib/libc/posix/posix_spawn.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/newlib/libc/posix/posix_spawn.c b/newlib/libc/posix/posix_spawn.c
index 005471f..cfec803 100644
--- a/newlib/libc/posix/posix_spawn.c
+++ b/newlib/libc/posix/posix_spawn.c
@@ -146,6 +146,17 @@ typedef struct __posix_spawn_file_actions_entry {
* Spawn routines
*/
+#if defined (__CYGWIN__) && defined (__i386__)
+extern int getgid32 (void);
+extern int getuid32 (void);
+extern int setegid32 (gid_t egid);
+extern int seteuid32 (uid_t euid);
+#define setegid setegid32
+#define seteuid seteuid32
+#define getgid getgid32
+#define getuid getuid32
+#endif
+
static int
process_spawnattr(const posix_spawnattr_t sa)
{
--
2.34.1

View File

@ -1,38 +0,0 @@
From 7a2c16a75836948e1172e82edee8ea9e571c0c2a Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <johannes.schindelin@gmx.de>
Date: Mon, 17 Jan 2022 17:55:17 +0100
Subject: [PATCH 44/N] path_conv: a directory with `.lnk` suffix is not a
`.lnk` file
When trying to create a directory called `xyz` in the presence of a
directory `xyz.lnk`, the MSYS2 runtime errors out with an `ENOENT`.
The root cause is actually a bit deeper: the `symlink_info::check()`
method tries to figure out whether the given path refers to a symbolic
link as emulated via `.lnk` files, but since it is a directory, that is
not the case. However, the `fileattr` field is not cleared, so that a
later `.exists()` call on the instance mistakenly thinks that the
symlink actually exists.
This fixes https://github.com/msys2/msys2-runtime/issues/81
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
winsup/cygwin/path.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 36f15bd..ca65127 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -3498,6 +3498,7 @@ restart:
hasn't been found. */
if (ext_tacked_on && !had_ext && (fileattr & FILE_ATTRIBUTE_DIRECTORY))
{
+ fileattr = INVALID_FILE_ATTRIBUTES;
set_error (ENOENT);
continue;
}
--
2.34.1

View File

@ -3,8 +3,8 @@
pkgbase=msys2-runtime
pkgname=('msys2-runtime' 'msys2-runtime-devel')
pkgver=3.3.3
pkgrel=7
pkgver=3.3.4
pkgrel=1
pkgdesc="Cygwin POSIX emulation engine"
arch=('i686' 'x86_64')
url="https://www.cygwin.com/"
@ -58,62 +58,44 @@ source=('msys2-runtime'::git://sourceware.org/git/newlib-cygwin.git#tag=cygwin-$
0031-Cygwin-make-option-for-native-inner-link-handling.patch
0032-docs-skip-building-texinfo-and-PDF-files.patch
0033-install-libs-depend-on-the-toollibs.patch
0034-fixup-Rename-dll-from-cygwin-to-msys.patch
0035-Cygwin-pty-fix-bug-in-reduced-input-transfer.patch
0036-Cygwin-path-Convert-UNC-path-prefix-back-to-drive-le.patch
0037-Cygwin-path-Fix-path-conversion-of-virtual-drive.patch
0038-fixup-CI-add-a-GHA-for-doing-a-basic-build-test.patch
0039-Cygwin-fhandler_pipe-get_query_hdl_per_process-avoid.patch
0040-POSIX-ify-the-SHELL-variable.patch
0041-Handle-ORIGINAL_PATH-just-like-PATH.patch
0042-fixup-CI-add-a-GHA-for-doing-a-basic-build-test.patch
0043-posix_spawn-fix-get-set-uid-gid-calls-for-32-bit-Cyg.patch
0044-path_conv-a-directory-with-.lnk-suffix-is-not-a-.lnk.patch)
0034-POSIX-ify-the-SHELL-variable.patch
0035-Handle-ORIGINAL_PATH-just-like-PATH.patch)
sha256sums=('SKIP'
'c933090fc69948f47dc6452fb9913750de9e341fd80534e7099c7a16f8391167'
'c25197a13a4df28bd34283d830d14d1c091b6517a5f298ce0f50b14fd31b7e8f'
'3a3da05259b0f472d47489c34c445e45458a7fe3da376853a67ba36fe08ec475'
'24a403ee90c1545c9ff6c2a514165e528b41172375efcf0a52c11cb0881047f9'
'0b161362d679bee3a815c59dce92181a9d8dac65fa2e538e6bd2f8c919160947'
'008c5d1b55229edbc630ed886466d0392b48a94ece7af5f88b622a81f8635296'
'0763ac24d51479df033dcfea9e9d35e4e3effd57e21c8c9891c2e42840e2d980'
'c197fb040eab7f5952c979ecad28a6b77d90d3940e0e82b25c3de62ab7780f21'
'fe757631d03c53424795f883bfba5d6a92dcb248d1f0ff4e2eb6ad3897cdbaca'
'86a313ec911adf513574d2bdb2eb4e1be057cdc3d0dd7a66f1bd2f6307af8eb3'
'24cb6a85e50379ab9206d29fe0c61305897b84b944391394db64e3623d682adf'
'99b07e4665952fffae070c7247458f2b8033f4dc03d0c57d19beedd62d361f11'
'ee03d19bba78cf4f27bc6a3f02cad1e7df232fd4638e1426c01d236cfa5d234d'
'a0c2c18b7e95de1449acb7d6cc5b75ba59492bbf3a0d685b15b331bd2a43e120'
'c0921f539cea440960d6b4c5f37d7074f945109ad20dfb375b9ff6f938340483'
'7651671b39eac52b11e6ab15d4bcdec44c106b222042603351cc658a46b89699'
'41cd66f80653c6cb54b4962d472504e9e333f92a2cf1a70e596cbb9bfaa62d36'
'd1b8f1c0f6fff5a224458655da5a1fc755ce5406368cd4e98356a162b309cd64'
'3682e76d282a4c5b66424636a5ace3a3b62816c22ad7c7b25b9b24f55a226fee'
'45a9149ca2e81d6f93abaf3d077285e3565ea7b46a0ec812170708ef88c07fe4'
'1dfb9aaafb2b6606e024ca8ebc320897d84113d5e54210a358d803ebbf537975'
'3ae6028f7d7571fe2a8d547472cb31ca3a671cc12e1150542f6a08d7f7e572a9'
'f15cefe3d27cab7af7d0ed454a35f42e4e18a0c6cb03aff5480d47bd58e460f7'
'bf9bef389d3dca6f925ee07fee171fc1af81ad4c8f1451973906866ed4626a68'
'f8feea53ad3144715b43dd5674d43f8752b5aee6ab024e1446027e97ddd44733'
'eb0d8a021d62ab7e3d8b021548765c860a0f9cae3953d9147134b9d021bc3701'
'488fcbb7111592810399ef3a794d6806c0073ea29a632b17c0dbcffe59f59d73'
'14deab2049942144413c1499b1d4cfdab4bb8707ad247102ec13e349c8e57779'
'c04dd4fe9cb9ef9bbfc3cfd0a903b3f59205824fb41fbebf51d113775dbe189b'
'289e90d99d31dffca18dd1bf989198dad9a2dd43c8b7b9621df8a057236212f6'
'e2cc8ad38c62f83cfa63f1935b4aae9454953078e07bd7d5718f775dd398ae46'
'4c3fcaa7f63581488504d321bca7a475153b5a1327e913ddbeb2f80443f16757'
'db27ac00a4f1f5621cfcbbb215cd2b8af629d347b7d1de56145f18360fb90a58'
'8257cf1beeb00b95eb1ac0a913de3aa1844ee7ea1b16cee59ecd205cf7deab9f'
'8545ac529b2fa7d33b92735c3371a16b0377b5860c94254b78882da70af143f0'
'8f0932a0595d54ab3ba50bc105c595f0083bb22eac4524fd69d624efce79f666'
'3dae0b2dbbf30c0b6c3ba55a64a897d46cb7ddd27fb8f4f25306159edbef0feb'
'bf719010c001455812dca85f54917668feaae88d2c3ff339754e6dc8b5cb0aa5'
'2d1f19222e917caae30f5640e18e812b92995533b181b0d1e315cec5bfc8feb1'
'4db81cd6dcabb23eb7e4b14781ce368021156b9dfc02397dc824407187687fd6'
'5517535ed08b2d28144311eb871c3d451635788bf7dc0b5ac0ebb66d44939ea9'
'c20f5238987778a6a46051e6b0c489de8fde7f7428b15bb8254f358b4b70f383'
'9dd0bea8906d79fe47c1134a26379b777ca5016be0d01120e6a3d96b319a2f70'
'0994c0f1bcd1bace12b970ff64be0b6b56a45ed70b06da32d08e85dded841e79')
'64ac070b68e31a8312f6fe4aeb5bebd578ffa38cccc9f4ff195e54602fe7ce1d'
'3667a48778037871e108e30ae655857b1af1e55f64b3bbfbaece18225919588b'
'b5f0dfb780c67f612da0aef974e08426b0d54d6b94dd0225122d874e25a3867b'
'4ad77dae3a531e66552514c04c113c11f2a01fe77ab06b873eeb7cc249080222'
'd670261158abb93b6e83240d09e91aace3e72138eff4f315baa8dd83dbcd3f9f'
'564b3cfb96639c85ec0c61239b95ac7ac830f5ced482cfbcc57cbbe782436505'
'f4e1d7d6941856435aef5c5062d74b85369b12790ea1c70da0f52a883fa2bc8b'
'8891230aeb863340fb401c8d44f38486730f064a03ca5c4e8eaf262351340dfa'
'cf412757351261a83ab950e2c75663f345b1dbc4bef22e2af59a9d768e8d6297'
'bc2eaf1396d55f03651cd4c3b642c7337ad457f36be7db4ecf379ab25cd4460d'
'6ecf33a61dcc7b1e9ad58d5b4e32663010e3f7671119ecfae6ef320417fde2fd'
'0a11e91381a5a5c26fa3fe6ff532f706e0791539578e0f1544fd3bbfa51064a3'
'31d30b47f159c36fb63d98fed583d8adc79c9c6690419dd329e1fe4d50a96e07'
'7152b812b154fba8264ef591fbacd8f106f37e7ebaf460a3b196261334f655d1'
'1b20a6321e7565fe3b0f48c30fc89ff5eab73368e6dc85916f1db474f9e7bf5e'
'e627ad17c4026923536d9d6af4ca4b510f068c6328daf5fb7cec94dfa056a070'
'3af75bf35c98a9b12168bdde1850564fdfd20d5ea57ffa9036ced0a4ec7789a9'
'a1c9ded94c02663e70fdcf047f723be026212fc57895a054504d6aae520b097f'
'ccdc3d68792f9127233323dd4533a1d5577c6039ae3144cb7f38da50af178f7c'
'a1a3be713cdf9ba93d810f8cd71f4865d2b28831242e4a28884fdf6327a63ebf'
'589b01a5a0f977e3aaaaffb9df9c1d823cced5f1cc00e777fd8efbef605656b1'
'df3b0b3f407a2e12539ea2b07d98074b73ef6f1d170c50df8c5ba6c8ca3df46e'
'cfbdae560c4575b34b99e33fc91fc41163f36155bee94d212cf3eaf3d87c23b9'
'cf211e17bace749544473f794be2894a1a17a4642811c10f8c0fee2566b705bc'
'd56f1ca191002a0d24b3154143d28bfce00af5a02b7cf05a972645fcf0144e48'
'6d0ea8e208a97ec8bc6de20368442be4eb2f99988af554ce5cf7697ba41c7a47'
'e97a19deabce74ac3132df2081fcda7b132d89bbd31d7b3abb302f3a450d9857'
'73c6512d09bbf0173c27cd8c406df61ccedfcf128009bc04f0cc39f548e043fc'
'573df1c91bf3572988a3f2572227f9011f04f00fbd2fc5c6f17d14f6d7787840'
'1a2eb4159f09e234237b2f2e85f194b4e83187c5ac5732ed49dceea67c6f454f'
'7c11bf3a47d807dcf88a6a9dd0216fbaa35f1828b066bf017594817f69288f5e'
'5de4086c8d50aef52f2f913b6d5422e8a708697b6e0d3a14b8eb5b1d1edc6edb'
'5d6e53014407ed0982d5a22fcf32ddd3f448779215df0f9f95eb5ba43662d72b'
'f274641faab366f6f0d5a53f68147755186cead3dbfbc95eb388b783b4d97b39'
'0fc0bdbd1dc26bd3050b9ab889dab1a53c69a3d6a7d25cf0581a21c518a03fed')
# Helper macros to help make tasks easier #
apply_patch_with_msg() {
@ -184,17 +166,8 @@ prepare() {
0031-Cygwin-make-option-for-native-inner-link-handling.patch \
0032-docs-skip-building-texinfo-and-PDF-files.patch \
0033-install-libs-depend-on-the-toollibs.patch \
0034-fixup-Rename-dll-from-cygwin-to-msys.patch \
0035-Cygwin-pty-fix-bug-in-reduced-input-transfer.patch \
0036-Cygwin-path-Convert-UNC-path-prefix-back-to-drive-le.patch \
0037-Cygwin-path-Fix-path-conversion-of-virtual-drive.patch \
0038-fixup-CI-add-a-GHA-for-doing-a-basic-build-test.patch \
0039-Cygwin-fhandler_pipe-get_query_hdl_per_process-avoid.patch \
0040-POSIX-ify-the-SHELL-variable.patch \
0041-Handle-ORIGINAL_PATH-just-like-PATH.patch \
0042-fixup-CI-add-a-GHA-for-doing-a-basic-build-test.patch \
0043-posix_spawn-fix-get-set-uid-gid-calls-for-32-bit-Cyg.patch \
0044-path_conv-a-directory-with-.lnk-suffix-is-not-a-.lnk.patch
0034-POSIX-ify-the-SHELL-variable.patch \
0035-Handle-ORIGINAL_PATH-just-like-PATH.patch
}
build() {