diff --git a/msys2-runtime/0001-Fix-msys-library-name-in-import-libraries.patch b/msys2-runtime/0001-Fix-msys-library-name-in-import-libraries.patch index 1ae91ac7..d9304429 100644 --- a/msys2-runtime/0001-Fix-msys-library-name-in-import-libraries.patch +++ b/msys2-runtime/0001-Fix-msys-library-name-in-import-libraries.patch @@ -1,4 +1,4 @@ -From b662426d796ad9fa7593f17840f49282835fa876 Mon Sep 17 00:00:00 2001 +From 39b4a0d5f23f0593b1e4ad951ec22ab23a402e0c Mon Sep 17 00:00:00 2001 From: Kaleb Barrett Date: Sun, 14 Mar 2021 18:58:55 -0500 Subject: [PATCH 01/N] Fix msys library name in import libraries diff --git a/msys2-runtime/0002-Rename-dll-from-cygwin-to-msys.patch b/msys2-runtime/0002-Rename-dll-from-cygwin-to-msys.patch index 5ece20f3..144bdf57 100644 --- a/msys2-runtime/0002-Rename-dll-from-cygwin-to-msys.patch +++ b/msys2-runtime/0002-Rename-dll-from-cygwin-to-msys.patch @@ -1,4 +1,4 @@ -From 50d9d80db4a6a941a03d99d82afb760c4ab4101f Mon Sep 17 00:00:00 2001 +From baeb79eaef742dad98293ad6957708fe924e786a 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?= Date: Sun, 14 Apr 2019 21:09:17 +0300 @@ -314,10 +314,10 @@ index 2ff5dfa..11ef78c 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/pty.cc b/winsup/cygwin/fhandler/pty.cc -index 36fddbb..8154fcc 100644 +index 468bc3b..d97e604 100644 --- a/winsup/cygwin/fhandler/pty.cc +++ b/winsup/cygwin/fhandler/pty.cc -@@ -882,7 +882,11 @@ fhandler_pty_slave::open (int flags, mode_t) +@@ -879,7 +879,11 @@ fhandler_pty_slave::open (int flags, mode_t) pipe_reply repl; DWORD len; @@ -329,7 +329,7 @@ index 36fddbb..8154fcc 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, -@@ -1144,7 +1148,11 @@ fhandler_pty_slave::reset_switch_to_nat_pipe (void) +@@ -1141,7 +1145,11 @@ fhandler_pty_slave::reset_switch_to_nat_pipe (void) { char pipe[MAX_PATH]; __small_sprintf (pipe, @@ -341,7 +341,7 @@ index 36fddbb..8154fcc 100644 &cygheap->installation_key, get_minor ()); pipe_request req = { GET_HANDLES, GetCurrentProcessId () }; pipe_reply repl; -@@ -1605,9 +1613,15 @@ fhandler_pty_slave::tcflush (int queue) +@@ -1602,9 +1610,15 @@ fhandler_pty_slave::tcflush (int queue) if (queue == TCIFLUSH || queue == TCIOFLUSH) { char pipe[MAX_PATH]; @@ -357,7 +357,7 @@ index 36fddbb..8154fcc 100644 pipe_request req = { FLUSH_INPUT, GetCurrentProcessId () }; pipe_reply repl; DWORD n; -@@ -2039,7 +2053,11 @@ fhandler_pty_master::close (int flag) +@@ -2036,7 +2050,11 @@ fhandler_pty_master::close (int flag) pipe_reply repl; DWORD len; @@ -369,7 +369,7 @@ index 36fddbb..8154fcc 100644 &cygheap->installation_key, get_minor ()); acquire_output_mutex (mutex_timeout); if (master_ctl) -@@ -2950,7 +2968,11 @@ fhandler_pty_master::setup () +@@ -2946,7 +2964,11 @@ fhandler_pty_master::setup () /* Create master control pipe which allows the master to duplicate the pty pipe handles to processes which deserve it. */ @@ -381,7 +381,7 @@ index 36fddbb..8154fcc 100644 &cygheap->installation_key, unit); master_ctl = CreateNamedPipe (buf, PIPE_ACCESS_DUPLEX | FILE_FLAG_FIRST_PIPE_INSTANCE, -@@ -3840,7 +3862,11 @@ fhandler_pty_slave::transfer_input (tty::xfer_dir dir, HANDLE from, tty *ttyp, +@@ -3836,7 +3858,11 @@ fhandler_pty_slave::transfer_input (tty::xfer_dir dir, HANDLE from, tty *ttyp, { char pipe[MAX_PATH]; __small_sprintf (pipe, @@ -452,7 +452,7 @@ index 1e4cf98..b77598b 100644 } \ } \ diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h -index 89c1e1f..b85e8c3 100644 +index 69c19f5..e0f87a3 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -510,7 +510,11 @@ details. */ @@ -633,7 +633,7 @@ index f9906a5..2361ae5 100644 ts.SourceIdentifier.LowPart = kerberos_auth ? 0x0105 : 0x0106; diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc -index d6a2c2d..affaa0d 100644 +index 1b1ff17..eddc0f6 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -339,7 +339,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access, ULONG flags) diff --git a/msys2-runtime/0003-Add-functionality-for-converting-UNIX-paths-in-argum.patch b/msys2-runtime/0003-Add-functionality-for-converting-UNIX-paths-in-argum.patch index ebf4c058..484a9631 100644 --- a/msys2-runtime/0003-Add-functionality-for-converting-UNIX-paths-in-argum.patch +++ b/msys2-runtime/0003-Add-functionality-for-converting-UNIX-paths-in-argum.patch @@ -1,4 +1,4 @@ -From f95036ca2c8c6275eb073914b6ceb80f99800c9a Mon Sep 17 00:00:00 2001 +From 5031617a9a1d4ec25a4c47a85adcf9e8fbf8b1ba 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?= Date: Sun, 14 Apr 2019 21:17:46 +0300 @@ -999,7 +999,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 ed08398..8ef347c 100644 +index 8aff97a..b758bc5 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -66,6 +66,7 @@ @@ -1010,7 +1010,7 @@ index ed08398..8ef347c 100644 #undef basename suffix_info stat_suffixes[] = -@@ -3895,6 +3896,74 @@ fchdir (int fd) +@@ -3898,6 +3899,74 @@ fchdir (int fd) return res; } @@ -1086,7 +1086,7 @@ index ed08398..8ef347c 100644 /* Cover functions to the path conversion routines. diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc -index cb58b6e..3ff2187 100644 +index 71add87..785586a 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -286,6 +286,27 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, diff --git a/msys2-runtime/0004-Add-functionality-for-changing-OS-name-via-MSYSTEM-e.patch b/msys2-runtime/0004-Add-functionality-for-changing-OS-name-via-MSYSTEM-e.patch index c5607982..63ac3dcd 100644 --- a/msys2-runtime/0004-Add-functionality-for-changing-OS-name-via-MSYSTEM-e.patch +++ b/msys2-runtime/0004-Add-functionality-for-changing-OS-name-via-MSYSTEM-e.patch @@ -1,4 +1,4 @@ -From 10bdfe7d2cde9d14411e141ed9837c1904c57496 Mon Sep 17 00:00:00 2001 +From 4b92ba68de4def343faf23dc1858275c4a8115fc 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?= Date: Sun, 14 Apr 2019 21:29:01 +0300 diff --git a/msys2-runtime/0005-Move-root-to-usr.-Change-sorting-mount-points.-By-de.patch b/msys2-runtime/0005-Move-root-to-usr.-Change-sorting-mount-points.-By-de.patch index 850d6cdc..7da7155d 100644 --- a/msys2-runtime/0005-Move-root-to-usr.-Change-sorting-mount-points.-By-de.patch +++ b/msys2-runtime/0005-Move-root-to-usr.-Change-sorting-mount-points.-By-de.patch @@ -1,4 +1,4 @@ -From 8b9860bde46b2d516d942fdd58b49eab4b9bedc0 Mon Sep 17 00:00:00 2001 +From c2e033e25d220b9aac43cbc73c4e4f6ec7d41d5a 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?= Date: Sun, 14 Apr 2019 21:45:06 +0300 @@ -35,7 +35,7 @@ index 163b475..15e9a34 100644 public: void init (bool); diff --git a/winsup/cygwin/mm/cygheap.cc b/winsup/cygwin/mm/cygheap.cc -index 3388864..5409a6b 100644 +index 1c9b803..4a60995 100644 --- a/winsup/cygwin/mm/cygheap.cc +++ b/winsup/cygwin/mm/cygheap.cc @@ -220,14 +220,22 @@ init_cygheap::init_installation_root () diff --git a/msys2-runtime/0006-Instead-of-creating-Cygwin-symlinks-use-deep-copy-by.patch b/msys2-runtime/0006-Instead-of-creating-Cygwin-symlinks-use-deep-copy-by.patch index 0b0dce5d..02484426 100644 --- a/msys2-runtime/0006-Instead-of-creating-Cygwin-symlinks-use-deep-copy-by.patch +++ b/msys2-runtime/0006-Instead-of-creating-Cygwin-symlinks-use-deep-copy-by.patch @@ -1,4 +1,4 @@ -From 242443bf1f2cfabbcb0ea5202f1b5f7d196fd24c Mon Sep 17 00:00:00 2001 +From aaf1b29d8f4ca24846e3a69c0d6b3c96766baaeb 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?= Date: Sun, 14 Apr 2019 21:47:21 +0300 @@ -62,7 +62,7 @@ index d8e058f..b7e0e21 100644 bool winjitdebug = false; diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc -index 8ef347c..aae10fe 100644 +index b758bc5..f6bfe08 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -1722,6 +1722,173 @@ conv_path_list (const char *src, char *dst, size_t size, @@ -239,7 +239,7 @@ index 8ef347c..aae10fe 100644 /* Create a symlink from FROMPATH to TOPATH. */ extern "C" int -@@ -2045,6 +2212,84 @@ symlink_wsl (const char *oldpath, path_conv &win32_newpath) +@@ -2048,6 +2215,84 @@ symlink_wsl (const char *oldpath, path_conv &win32_newpath) return 0; } @@ -324,7 +324,7 @@ index 8ef347c..aae10fe 100644 int symlink_worker (const char *oldpath, path_conv &win32_newpath, bool isdevice) { -@@ -2112,6 +2357,13 @@ symlink_worker (const char *oldpath, path_conv &win32_newpath, bool isdevice) +@@ -2115,6 +2360,13 @@ symlink_worker (const char *oldpath, path_conv &win32_newpath, bool isdevice) case WSYM_nfs: res = symlink_nfs (oldpath, win32_newpath); __leave; diff --git a/msys2-runtime/0007-Automatically-rewrite-TERM-msys-to-TERM-cygwin.patch b/msys2-runtime/0007-Automatically-rewrite-TERM-msys-to-TERM-cygwin.patch index 59849fbb..082c4034 100644 --- a/msys2-runtime/0007-Automatically-rewrite-TERM-msys-to-TERM-cygwin.patch +++ b/msys2-runtime/0007-Automatically-rewrite-TERM-msys-to-TERM-cygwin.patch @@ -1,4 +1,4 @@ -From 9e313a6cf7e8b875ed612d561a3e94b586d179b4 Mon Sep 17 00:00:00 2001 +From 162b87243c304b684b3e9d9bffdb988c0690aae4 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?= Date: Sun, 14 Apr 2019 21:48:54 +0300 diff --git a/msys2-runtime/0008-Do-not-convert-environment-for-strace.patch b/msys2-runtime/0008-Do-not-convert-environment-for-strace.patch index a2bb4d33..9160bc1b 100644 --- a/msys2-runtime/0008-Do-not-convert-environment-for-strace.patch +++ b/msys2-runtime/0008-Do-not-convert-environment-for-strace.patch @@ -1,4 +1,4 @@ -From 3f325c89dc11e09091758cd82134f15383dc31de Mon Sep 17 00:00:00 2001 +From 317ab5c021d2072be8d3d47b7bee402da1e5d65e 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?= Date: Sun, 14 Apr 2019 21:50:55 +0300 @@ -10,7 +10,7 @@ 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 3ff2187..8525285 100644 +index 785586a..cc1cf49 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -539,11 +539,13 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, diff --git a/msys2-runtime/0009-strace.cc-Don-t-set-MSYS-noglob.patch b/msys2-runtime/0009-strace.cc-Don-t-set-MSYS-noglob.patch index 3565cf2d..1ab82760 100644 --- a/msys2-runtime/0009-strace.cc-Don-t-set-MSYS-noglob.patch +++ b/msys2-runtime/0009-strace.cc-Don-t-set-MSYS-noglob.patch @@ -1,4 +1,4 @@ -From c657f7cda50bea6902f89849b4be128deec67c03 Mon Sep 17 00:00:00 2001 +From 635e83729ab3d854e9ee332137fd9e90eb9e2e35 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sun, 23 Aug 2015 20:47:30 +0100 Subject: [PATCH 09/N] strace.cc: Don't set MSYS=noglob diff --git a/msys2-runtime/0010-Add-debugging-for-strace-make_command_line.patch b/msys2-runtime/0010-Add-debugging-for-strace-make_command_line.patch index dccd37ca..3275dcd5 100644 --- a/msys2-runtime/0010-Add-debugging-for-strace-make_command_line.patch +++ b/msys2-runtime/0010-Add-debugging-for-strace-make_command_line.patch @@ -1,4 +1,4 @@ -From 1cd647fe8360636f707702f6e8f9e9b9f3c8fc9b Mon Sep 17 00:00:00 2001 +From ec9b0f5fad49a2a725f9607c4e6a3d6f128a492e Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Fri, 21 Aug 2015 09:52:47 +0100 Subject: [PATCH 10/N] Add debugging for strace make_command_line diff --git a/msys2-runtime/0011-strace-quiet-be-really-quiet.patch b/msys2-runtime/0011-strace-quiet-be-really-quiet.patch index f6a6ea1e..5bb48b96 100644 --- a/msys2-runtime/0011-strace-quiet-be-really-quiet.patch +++ b/msys2-runtime/0011-strace-quiet-be-really-quiet.patch @@ -1,4 +1,4 @@ -From 0dc024e84c382293c00665b7f8a278a3e6b3b03b Mon Sep 17 00:00:00 2001 +From aae2354437aa66cf26b72451be333f3105ee2aaf Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 17 May 2017 18:13:32 +0200 Subject: [PATCH 11/N] strace --quiet: be *really* quiet diff --git a/msys2-runtime/0012-path_conv-special-case-root-directory-to-have-traili.patch b/msys2-runtime/0012-path_conv-special-case-root-directory-to-have-traili.patch index 00bd0b47..ae89af76 100644 --- a/msys2-runtime/0012-path_conv-special-case-root-directory-to-have-traili.patch +++ b/msys2-runtime/0012-path_conv-special-case-root-directory-to-have-traili.patch @@ -1,4 +1,4 @@ -From 322dd0f40aead560ddd80e7a785678ce0dee5b91 Mon Sep 17 00:00:00 2001 +From 9928501f241ff534ba0df6b1397d8ad74f29fba9 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?= Date: Sun, 14 Apr 2019 22:13:51 +0300 @@ -31,7 +31,7 @@ Signed-off-by: Johannes Schindelin 1 file changed, 7 insertions(+) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc -index aae10fe..6884e11 100644 +index f6bfe08..5ce0ba0 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -742,6 +742,12 @@ path_conv::check (const char *src, unsigned opt, diff --git a/msys2-runtime/0013-When-converting-to-a-Unix-path-avoid-double-trailing.patch b/msys2-runtime/0013-When-converting-to-a-Unix-path-avoid-double-trailing.patch index 8b874a69..feb5a10b 100644 --- a/msys2-runtime/0013-When-converting-to-a-Unix-path-avoid-double-trailing.patch +++ b/msys2-runtime/0013-When-converting-to-a-Unix-path-avoid-double-trailing.patch @@ -1,4 +1,4 @@ -From 27d29355abb65c61fae4c2bf1e7f6a11e9dbe3ab Mon Sep 17 00:00:00 2001 +From 15b900547389ea8c6dd6423cdcc996a4142a626c Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 8 Nov 2022 16:24:20 +0100 Subject: [PATCH 13/N] When converting to a Unix path, avoid double trailing diff --git a/msys2-runtime/0014-msys2_path_conv-pass-PC_NOFULL-to-path_conv.patch b/msys2-runtime/0014-msys2_path_conv-pass-PC_NOFULL-to-path_conv.patch index 4be1e355..5a5e708f 100644 --- a/msys2-runtime/0014-msys2_path_conv-pass-PC_NOFULL-to-path_conv.patch +++ b/msys2-runtime/0014-msys2_path_conv-pass-PC_NOFULL-to-path_conv.patch @@ -1,4 +1,4 @@ -From 31e634e4870285f01be9f05e381c5995df2b0c99 Mon Sep 17 00:00:00 2001 +From 570a0124015d67fb9870f41c75cf76fb4a3e5e2b Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sun, 20 Nov 2022 13:57:36 +0100 Subject: [PATCH 14/N] msys2_path_conv: pass PC_NOFULL to path_conv diff --git a/msys2-runtime/0015-path-conversion-Introduce-ability-to-switch-off-conv.patch b/msys2-runtime/0015-path-conversion-Introduce-ability-to-switch-off-conv.patch index 29240701..7151d9b2 100644 --- a/msys2-runtime/0015-path-conversion-Introduce-ability-to-switch-off-conv.patch +++ b/msys2-runtime/0015-path-conversion-Introduce-ability-to-switch-off-conv.patch @@ -1,4 +1,4 @@ -From 0d54d3775f02b13ca3305c0dfbb1d94dff127b63 Mon Sep 17 00:00:00 2001 +From de30986ba8c300481b8afa4a22af868a38998f66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A7=88=EB=88=84=EC=97=98?= Date: Wed, 17 Jun 2015 09:30:41 +0200 Subject: [PATCH 15/N] path-conversion: Introduce ability to switch off diff --git a/msys2-runtime/0016-dcrt0.cc-Untangle-allow_glob-from-winshell.patch b/msys2-runtime/0016-dcrt0.cc-Untangle-allow_glob-from-winshell.patch index 31e82962..7691931c 100644 --- a/msys2-runtime/0016-dcrt0.cc-Untangle-allow_glob-from-winshell.patch +++ b/msys2-runtime/0016-dcrt0.cc-Untangle-allow_glob-from-winshell.patch @@ -1,4 +1,4 @@ -From 753f879d591d4fc4bb22b489f436a9159c3cc783 Mon Sep 17 00:00:00 2001 +From a1ad8856c16c8eacae039852ba278afbf3713234 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Fri, 21 Aug 2015 12:52:09 +0100 Subject: [PATCH 16/N] dcrt0.cc: Untangle allow_glob from winshell diff --git a/msys2-runtime/0017-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch b/msys2-runtime/0017-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch index 9b473938..e9f049ec 100644 --- a/msys2-runtime/0017-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch +++ b/msys2-runtime/0017-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch @@ -1,4 +1,4 @@ -From 6caceef91c2267b5d69a57f6dbfd831240fcb6f5 Mon Sep 17 00:00:00 2001 +From a863a979c5c9e6075d087e5bd66f931a08953ccf Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Mon, 24 Aug 2015 00:48:06 +0100 Subject: [PATCH 17/N] dcrt0.cc (globify): Don't quote literal strings diff --git a/msys2-runtime/0018-Add-debugging-for-build_argv.patch b/msys2-runtime/0018-Add-debugging-for-build_argv.patch index 67578674..e4feb2f5 100644 --- a/msys2-runtime/0018-Add-debugging-for-build_argv.patch +++ b/msys2-runtime/0018-Add-debugging-for-build_argv.patch @@ -1,4 +1,4 @@ -From ab509c6bbedcbca387845bf4303040aa2e19b8e0 Mon Sep 17 00:00:00 2001 +From cf6b4fb98e29589b624ba24c1438fa6e447adeed Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Fri, 21 Aug 2015 12:18:52 +0100 Subject: [PATCH 18/N] Add debugging for build_argv diff --git a/msys2-runtime/0019-environ.cc-New-facility-environment-variable-MSYS2_E.patch b/msys2-runtime/0019-environ.cc-New-facility-environment-variable-MSYS2_E.patch index ce8f764e..bd2fff43 100644 --- a/msys2-runtime/0019-environ.cc-New-facility-environment-variable-MSYS2_E.patch +++ b/msys2-runtime/0019-environ.cc-New-facility-environment-variable-MSYS2_E.patch @@ -1,4 +1,4 @@ -From 64d12ced94891fda224ff4d34ad359bbab722e12 Mon Sep 17 00:00:00 2001 +From 240fcf26149323ff87e04cad202b78a2ba4f4770 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sun, 10 Apr 2016 21:47:41 +0100 Subject: [PATCH 19/N] environ.cc: New facility/environment variable @@ -129,10 +129,10 @@ index 31080d0..f3bfba0 100644 (See "How to: Set a Thread Name in Native Code" diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc -index 6884e11..7c42253 100644 +index 5ce0ba0..b342609 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc -@@ -4174,7 +4174,6 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions, +@@ -4177,7 +4177,6 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions, return arg_result; } @@ -141,7 +141,7 @@ index 6884e11..7c42253 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 8525285..854c25a 100644 +index cc1cf49..2cc5716 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -287,8 +287,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, diff --git a/msys2-runtime/0020-Introduce-the-enable_pcon-value-for-MSYS.patch b/msys2-runtime/0020-Introduce-the-enable_pcon-value-for-MSYS.patch index c40629c9..b5b42d4e 100644 --- a/msys2-runtime/0020-Introduce-the-enable_pcon-value-for-MSYS.patch +++ b/msys2-runtime/0020-Introduce-the-enable_pcon-value-for-MSYS.patch @@ -1,4 +1,4 @@ -From 816c4c8e500717abd688d7da08d1073bae31cd1d Mon Sep 17 00:00:00 2001 +From 5581aba14fe9d3aa28952b10a96616b3c2c7e8a5 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 19 May 2020 13:49:37 +0200 Subject: [PATCH 20/N] Introduce the `enable_pcon` value for `MSYS` diff --git a/msys2-runtime/0021-popen-call-usr-bin-sh-instead-of-bin-sh.patch b/msys2-runtime/0021-popen-call-usr-bin-sh-instead-of-bin-sh.patch index b41453f9..891a6bc8 100644 --- a/msys2-runtime/0021-popen-call-usr-bin-sh-instead-of-bin-sh.patch +++ b/msys2-runtime/0021-popen-call-usr-bin-sh-instead-of-bin-sh.patch @@ -1,4 +1,4 @@ -From 324c53b3ddfec4c546384f7a0ddba5f72214700a Mon Sep 17 00:00:00 2001 +From b5154609113547a19e86e6a0c9e272f80937786a Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 5 Jun 2020 20:09:11 +0200 Subject: [PATCH 21/N] popen: call /usr/bin/sh instead of /bin/sh @@ -17,15 +17,15 @@ in this scenario, so this maybe should be extended to all of them. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc -index affaa0d..76b37d6 100644 +index eddc0f6..3295922 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc -@@ -4535,7 +4535,7 @@ popen (const char *command, const char *in_type) - fcntl (stdchild, F_SETFD, stdchild_state | FD_CLOEXEC); +@@ -4536,7 +4536,7 @@ popen (const char *command, const char *in_type) /* Start a shell process to run the given command without forking. */ -- pid_t pid = ch_spawn.worker ("/bin/sh", argv, environ, _P_NOWAIT, -+ pid_t pid = ch_spawn.worker ("/usr/bin/sh", argv, environ, _P_NOWAIT, - __std[0], __std[1]); + child_info_spawn ch_spawn_local (_CH_NADA); +- pid_t pid = ch_spawn_local.worker ("/bin/sh", argv, environ, _P_NOWAIT, ++ pid_t pid = ch_spawn_local.worker ("/usr/bin/sh", argv, environ, _P_NOWAIT, + __std[0], __std[1]); /* Reinstate the close-on-exec state */ diff --git a/msys2-runtime/0022-Expose-full-command-lines-to-other-Win32-processes-b.patch b/msys2-runtime/0022-Expose-full-command-lines-to-other-Win32-processes-b.patch index 4d1e5d91..80cc60b1 100644 --- a/msys2-runtime/0022-Expose-full-command-lines-to-other-Win32-processes-b.patch +++ b/msys2-runtime/0022-Expose-full-command-lines-to-other-Win32-processes-b.patch @@ -1,4 +1,4 @@ -From 7e67f568ec3ec30af2572cf63f7b17179df4b958 Mon Sep 17 00:00:00 2001 +From a3e87c109ba7fa90bb94b6b6e5a2abfc272b799c Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 12 Aug 2020 12:22:38 +0200 Subject: [PATCH 22/N] Expose full command-lines to other Win32 processes by diff --git a/msys2-runtime/0023-Add-a-helper-to-obtain-a-function-s-address-in-kerne.patch b/msys2-runtime/0023-Add-a-helper-to-obtain-a-function-s-address-in-kerne.patch index 130d31b0..d07356c5 100644 --- a/msys2-runtime/0023-Add-a-helper-to-obtain-a-function-s-address-in-kerne.patch +++ b/msys2-runtime/0023-Add-a-helper-to-obtain-a-function-s-address-in-kerne.patch @@ -1,4 +1,4 @@ -From f7f1624e976bf258be3fe3ccd79ba10c92ffdcd4 Mon Sep 17 00:00:00 2001 +From ab684c659fa0f37f0d4134c371f69cb6b88ba1dd Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 16 Apr 2018 14:59:39 +0200 Subject: [PATCH 23/N] Add a helper to obtain a function's address in diff --git a/msys2-runtime/0024-Emulate-GenerateConsoleCtrlEvent-upon-Ctrl-C.patch b/msys2-runtime/0024-Emulate-GenerateConsoleCtrlEvent-upon-Ctrl-C.patch index 1e3815e9..77258fb3 100644 --- a/msys2-runtime/0024-Emulate-GenerateConsoleCtrlEvent-upon-Ctrl-C.patch +++ b/msys2-runtime/0024-Emulate-GenerateConsoleCtrlEvent-upon-Ctrl-C.patch @@ -1,4 +1,4 @@ -From 1453ede12eb758a0d8103902a765503c0cee936e Mon Sep 17 00:00:00 2001 +From 97045ebb056b6b6c5609b8d319872414008f6be5 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 20 Mar 2015 09:56:28 +0000 Subject: [PATCH 24/N] Emulate GenerateConsoleCtrlEvent() upon Ctrl+C diff --git a/msys2-runtime/0025-kill-kill-Win32-processes-more-gently.patch b/msys2-runtime/0025-kill-kill-Win32-processes-more-gently.patch index b593767b..4cfa6d66 100644 --- a/msys2-runtime/0025-kill-kill-Win32-processes-more-gently.patch +++ b/msys2-runtime/0025-kill-kill-Win32-processes-more-gently.patch @@ -1,4 +1,4 @@ -From e30cdeb60808a680265e0359fcdaee4599fdb89c Mon Sep 17 00:00:00 2001 +From 169cc75001e874e7e0cf0b172137604d69218b0d Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 20 Mar 2015 10:01:50 +0000 Subject: [PATCH 25/N] kill: kill Win32 processes more gently diff --git a/msys2-runtime/0026-Cygwin-make-option-for-native-inner-link-handling.patch b/msys2-runtime/0026-Cygwin-make-option-for-native-inner-link-handling.patch index ceddbc49..0b8d786e 100644 --- a/msys2-runtime/0026-Cygwin-make-option-for-native-inner-link-handling.patch +++ b/msys2-runtime/0026-Cygwin-make-option-for-native-inner-link-handling.patch @@ -1,4 +1,4 @@ -From 5733e9145bb8caa971dbbb0b031b0015dc197ba9 Mon Sep 17 00:00:00 2001 +From e9c387d31a34c7bf6a67d6ae2a1e70f6cbd68cf5 Mon Sep 17 00:00:00 2001 From: Jeremy Drake Date: Thu, 22 Jul 2021 11:59:16 -0700 Subject: [PATCH 26/N] Cygwin: make option for native inner link handling. @@ -37,10 +37,10 @@ index 79f9476..30a2da1 100644 /* Taken from BSD libc: This variable is zero until a process has created a pthread. It is used diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc -index 7c42253..8ddc201 100644 +index b342609..688e7f7 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc -@@ -3845,8 +3845,9 @@ restart: +@@ -3848,8 +3848,9 @@ restart: differ, return the final path as symlink content and set symlen to a negative value. This forces path_conv::check to restart symlink evaluation with the new path. */ diff --git a/msys2-runtime/0027-docs-skip-building-texinfo-and-PDF-files.patch b/msys2-runtime/0027-docs-skip-building-texinfo-and-PDF-files.patch index cadb076a..2989efd4 100644 --- a/msys2-runtime/0027-docs-skip-building-texinfo-and-PDF-files.patch +++ b/msys2-runtime/0027-docs-skip-building-texinfo-and-PDF-files.patch @@ -1,4 +1,4 @@ -From 82fd4e188cafda0f8f21bdefbb4a8c3857fd86dc Mon Sep 17 00:00:00 2001 +From 6a898da60fbe5c86ddb4bfee65169812be0a8aea Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 8 Nov 2021 14:20:07 +0100 Subject: [PATCH 27/N] docs: skip building texinfo and PDF files diff --git a/msys2-runtime/0028-install-libs-depend-on-the-toollibs.patch b/msys2-runtime/0028-install-libs-depend-on-the-toollibs.patch index 888afdd9..f94f36af 100644 --- a/msys2-runtime/0028-install-libs-depend-on-the-toollibs.patch +++ b/msys2-runtime/0028-install-libs-depend-on-the-toollibs.patch @@ -1,4 +1,4 @@ -From f6b74e290585875472441d46bf5e06bedcfef225 Mon Sep 17 00:00:00 2001 +From 65fb4f38608ef9b9ad1d411a9388fd2d2924239e Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 8 Nov 2021 16:22:57 +0100 Subject: [PATCH 28/N] install-libs: depend on the "toollibs" diff --git a/msys2-runtime/0029-POSIX-ify-the-SHELL-variable.patch b/msys2-runtime/0029-POSIX-ify-the-SHELL-variable.patch index 266ed0b2..06e97df0 100644 --- a/msys2-runtime/0029-POSIX-ify-the-SHELL-variable.patch +++ b/msys2-runtime/0029-POSIX-ify-the-SHELL-variable.patch @@ -1,4 +1,4 @@ -From fe461717b2eec97c0524c9d32d28fb8db13b26f0 Mon Sep 17 00:00:00 2001 +From 4d520fc0f5115ccba0d4c7ce726d846eb00547a6 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 23 Nov 2015 20:03:11 +0100 Subject: [PATCH 29/N] POSIX-ify the SHELL variable diff --git a/msys2-runtime/0030-Handle-ORIGINAL_PATH-just-like-PATH.patch b/msys2-runtime/0030-Handle-ORIGINAL_PATH-just-like-PATH.patch index 886602d4..ecbef03b 100644 --- a/msys2-runtime/0030-Handle-ORIGINAL_PATH-just-like-PATH.patch +++ b/msys2-runtime/0030-Handle-ORIGINAL_PATH-just-like-PATH.patch @@ -1,4 +1,4 @@ -From 80235497b616c39598f8e4c553766286b004a6ca Mon Sep 17 00:00:00 2001 +From ad95c5cf97830718ca8aa65fd390196036322c6c Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 21 Mar 2017 13:18:38 +0100 Subject: [PATCH 30/N] Handle ORIGINAL_PATH just like PATH diff --git a/msys2-runtime/0031-uname-allow-setting-the-system-name-to-CYGWIN.patch b/msys2-runtime/0031-uname-allow-setting-the-system-name-to-CYGWIN.patch index ef4c26c7..07e03068 100644 --- a/msys2-runtime/0031-uname-allow-setting-the-system-name-to-CYGWIN.patch +++ b/msys2-runtime/0031-uname-allow-setting-the-system-name-to-CYGWIN.patch @@ -1,4 +1,4 @@ -From b03e6f9d01f8fb1b7baf122809db212089d94e45 Mon Sep 17 00:00:00 2001 +From 54f7f41a8a06a7569b1edd545a26c878f2d63965 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sun, 3 Jul 2022 22:39:32 +0200 Subject: [PATCH 31/N] uname: allow setting the system name to CYGWIN diff --git a/msys2-runtime/0032-Pass-environment-variables-with-empty-values.patch b/msys2-runtime/0032-Pass-environment-variables-with-empty-values.patch index 2577a1e9..37cca06a 100644 --- a/msys2-runtime/0032-Pass-environment-variables-with-empty-values.patch +++ b/msys2-runtime/0032-Pass-environment-variables-with-empty-values.patch @@ -1,4 +1,4 @@ -From 5194fb922ddc56c1538ade2dd3765acd9a01b5cc Mon Sep 17 00:00:00 2001 +From b4f031fd886c18e8e3a9dc02e236525b2469f756 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 18 Feb 2015 12:32:17 +0000 Subject: [PATCH 32/N] Pass environment variables with empty values diff --git a/msys2-runtime/0033-Optionally-disallow-empty-environment-values-again.patch b/msys2-runtime/0033-Optionally-disallow-empty-environment-values-again.patch index 8c817a35..a149871c 100644 --- a/msys2-runtime/0033-Optionally-disallow-empty-environment-values-again.patch +++ b/msys2-runtime/0033-Optionally-disallow-empty-environment-values-again.patch @@ -1,4 +1,4 @@ -From 13ef29703bcc1074331aa0e932d61f70e710c893 Mon Sep 17 00:00:00 2001 +From 4a7fa0d252da2d853aeb08eac42cf6bdfc54a84a Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 6 Sep 2022 10:40:58 +0200 Subject: [PATCH 33/N] Optionally disallow empty environment values again diff --git a/msys2-runtime/0034-build_env-respect-the-MSYS-environment-variable.patch b/msys2-runtime/0034-build_env-respect-the-MSYS-environment-variable.patch index 99df47a7..55c47413 100644 --- a/msys2-runtime/0034-build_env-respect-the-MSYS-environment-variable.patch +++ b/msys2-runtime/0034-build_env-respect-the-MSYS-environment-variable.patch @@ -1,4 +1,4 @@ -From cd4b539b367dc2a21041405cb52d3bf5dbf1a3be Mon Sep 17 00:00:00 2001 +From 9bf14b59a047b0af4e472f2467576f2095428809 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 6 Sep 2022 12:18:18 +0200 Subject: [PATCH 34/N] build_env(): respect the `MSYS` environment variable diff --git a/msys2-runtime/0035-Revert-Cygwin-Enable-dynamicbase-on-the-Cygwin-DLL-b.patch b/msys2-runtime/0035-Revert-Cygwin-Enable-dynamicbase-on-the-Cygwin-DLL-b.patch index 568f9886..b3f329e9 100644 --- a/msys2-runtime/0035-Revert-Cygwin-Enable-dynamicbase-on-the-Cygwin-DLL-b.patch +++ b/msys2-runtime/0035-Revert-Cygwin-Enable-dynamicbase-on-the-Cygwin-DLL-b.patch @@ -1,4 +1,4 @@ -From b0fe35837b3415c2fdc66d7bf11c84c903b54b07 Mon Sep 17 00:00:00 2001 +From 65ae61ddc90544b6a34c8377e227c0df014fcf07 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sat, 17 Dec 2022 20:14:49 +0100 Subject: [PATCH 35/N] Revert "Cygwin: Enable dynamicbase on the Cygwin DLL by diff --git a/msys2-runtime/0036-Avoid-sharing-cygheaps-across-Cygwin-versions.patch b/msys2-runtime/0036-Avoid-sharing-cygheaps-across-Cygwin-versions.patch index 75d8a4ca..91d54354 100644 --- a/msys2-runtime/0036-Avoid-sharing-cygheaps-across-Cygwin-versions.patch +++ b/msys2-runtime/0036-Avoid-sharing-cygheaps-across-Cygwin-versions.patch @@ -1,4 +1,4 @@ -From fdb1b2873f6b972d391c6119bf009fde89206fde Mon Sep 17 00:00:00 2001 +From 4a74e2f9fbf13775d5c4d064f05a4586f5bd2fa8 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 30 Jan 2023 23:22:22 +0100 Subject: [PATCH 36/N] Avoid sharing cygheaps across Cygwin versions @@ -116,7 +116,7 @@ index 4d622cd..33cad1e 100644 strace.activate (false); res = NULL; diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc -index 3618879..3ee7c88 100644 +index 30779cf..5caf97e 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -893,7 +893,7 @@ int child_info::retry_count = 0; @@ -126,5 +126,5 @@ index 3618879..3ee7c88 100644 - magic (CHILD_INFO_MAGIC), type (chtype), cygheap (::cygheap), + magic (CHILD_INFO_MAGIC ^ MSYS2_RUNTIME_COMMIT_HEX), type (chtype), cygheap (::cygheap), cygheap_max (::cygheap_max), flag (0), retry (child_info::retry_count), - rd_proc_pipe (NULL), wr_proc_pipe (NULL), sigmask (_my_tls.sigmask) - { + rd_proc_pipe (NULL), wr_proc_pipe (NULL), subproc_ready (NULL), + sigmask (_my_tls.sigmask) diff --git a/msys2-runtime/0037-uname-report-msys2-runtime-commit-hash-too.patch b/msys2-runtime/0037-uname-report-msys2-runtime-commit-hash-too.patch index d0c701c4..8c192f9f 100644 --- a/msys2-runtime/0037-uname-report-msys2-runtime-commit-hash-too.patch +++ b/msys2-runtime/0037-uname-report-msys2-runtime-commit-hash-too.patch @@ -1,4 +1,4 @@ -From 6378f634da96099ef17b2d443ebdd64fd8f89cce Mon Sep 17 00:00:00 2001 +From 5baa55c491e821d0f2f88b408a235d34bd1684e1 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 21 Feb 2023 16:36:36 +0100 Subject: [PATCH 37/N] uname: report msys2-runtime commit hash, too diff --git a/msys2-runtime/0038-Cygwin-Adjust-CWD-magic-to-accommodate-for-the-lates.patch b/msys2-runtime/0038-Cygwin-Adjust-CWD-magic-to-accommodate-for-the-lates.patch index 393ca96b..04fbdcdd 100644 --- a/msys2-runtime/0038-Cygwin-Adjust-CWD-magic-to-accommodate-for-the-lates.patch +++ b/msys2-runtime/0038-Cygwin-Adjust-CWD-magic-to-accommodate-for-the-lates.patch @@ -1,4 +1,4 @@ -From 23a25d49e3b8c18f12ce588869d4cb24de9f2454 Mon Sep 17 00:00:00 2001 +From 0eeda3e131b580df38367f3c71df2cea2c18ee50 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 22 May 2023 13:36:27 +0200 Subject: [PATCH 38/N] Cygwin: Adjust CWD magic to accommodate for the latest @@ -43,10 +43,10 @@ Signed-off-by: Johannes Schindelin 1 file changed, 12 insertions(+) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc -index 8ddc201..ead7d16 100644 +index 688e7f7..c1298a4 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc -@@ -4896,6 +4896,18 @@ find_fast_cwd_pointer () +@@ -4899,6 +4899,18 @@ find_fast_cwd_pointer () %rcx for the subsequent RtlEnterCriticalSection call. */ lock = (const uint8_t *) memmem ((const char *) use_cwd, 80, "\x48\x8d\x0d", 3); diff --git a/msys2-runtime/0039-Cygwin-cygheap-Add-lock-unlock-method.patch b/msys2-runtime/0039-Cygwin-cygheap-Add-lock-unlock-method.patch deleted file mode 100644 index a79461bc..00000000 --- a/msys2-runtime/0039-Cygwin-cygheap-Add-lock-unlock-method.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 0cc983578c7a112265fca83b6c5ea5d0724b29fa Mon Sep 17 00:00:00 2001 -From: Takashi Yano -Date: Sat, 19 Jul 2025 23:39:12 +0900 -Subject: [PATCH 39/N] Cygwin: cygheap: Add lock()/unlock() method - -...so that cygheap can be locked/unlocked from outside of mm/cygheap.cc. - -Reviewed-by: Corinna Vinschen -Signed-off-by: Takashi Yano -(cherry picked from commit aec6dc77a11b264fcac73b63ada701854fc62a22) ---- - winsup/cygwin/local_includes/cygheap.h | 5 +++++ - winsup/cygwin/mm/cygheap.cc | 12 ++++++------ - 2 files changed, 11 insertions(+), 6 deletions(-) - -diff --git a/winsup/cygwin/local_includes/cygheap.h b/winsup/cygwin/local_includes/cygheap.h -index fed87ec..d9e936c 100644 ---- a/winsup/cygwin/local_includes/cygheap.h -+++ b/winsup/cygwin/local_includes/cygheap.h -@@ -498,6 +498,9 @@ struct threadlist_t - - struct init_cygheap: public mini_cygheap - { -+private: -+ static SRWLOCK cygheap_protect; -+public: - _cmalloc_entry *chain; - char *buckets[NBUCKETS]; - UNICODE_STRING installation_root; -@@ -541,6 +544,8 @@ struct init_cygheap: public mini_cygheap - threadlist_t *find_tls (int, bool&); - sigset_t compute_sigblkmask (); - void unlock_tls (threadlist_t *t) { if (t) ReleaseMutex (t->mutex); } -+ inline void lock () { AcquireSRWLockExclusive (&cygheap_protect); } -+ inline void unlock () { ReleaseSRWLockExclusive (&cygheap_protect); } - }; - - -diff --git a/winsup/cygwin/mm/cygheap.cc b/winsup/cygwin/mm/cygheap.cc -index 5409a6b..4a60995 100644 ---- a/winsup/cygwin/mm/cygheap.cc -+++ b/winsup/cygwin/mm/cygheap.cc -@@ -35,7 +35,7 @@ static mini_cygheap NO_COPY cygheap_dummy = - init_cygheap NO_COPY *cygheap = (init_cygheap *) &cygheap_dummy; - void NO_COPY *cygheap_max; - --static NO_COPY SRWLOCK cygheap_protect = SRWLOCK_INIT; -+SRWLOCK NO_COPY init_cygheap::cygheap_protect = SRWLOCK_INIT; - - struct cygheap_entry - { -@@ -377,7 +377,7 @@ _cmalloc (unsigned size) - if (b >= NBUCKETS) - return NULL; - -- AcquireSRWLockExclusive (&cygheap_protect); -+ cygheap->lock (); - if (cygheap->buckets[b]) - { - rvc = (_cmalloc_entry *) cygheap->buckets[b]; -@@ -389,7 +389,7 @@ _cmalloc (unsigned size) - rvc = (_cmalloc_entry *) _csbrk (bucket_val[b] + sizeof (_cmalloc_entry)); - if (!rvc) - { -- ReleaseSRWLockExclusive (&cygheap_protect); -+ cygheap->unlock (); - return NULL; - } - -@@ -397,19 +397,19 @@ _cmalloc (unsigned size) - rvc->prev = cygheap->chain; - cygheap->chain = rvc; - } -- ReleaseSRWLockExclusive (&cygheap_protect); -+ cygheap->unlock (); - return rvc->data; - } - - static void - _cfree (void *ptr) - { -- AcquireSRWLockExclusive (&cygheap_protect); -+ cygheap->lock (); - _cmalloc_entry *rvc = to_cmalloc (ptr); - unsigned b = rvc->b; - rvc->ptr = cygheap->buckets[b]; - cygheap->buckets[b] = (char *) rvc; -- ReleaseSRWLockExclusive (&cygheap_protect); -+ cygheap->unlock (); - } - - static void * diff --git a/msys2-runtime/0040-Cygwin-spawn-Lock-cygheap-from-refresh_cygheap-until.patch b/msys2-runtime/0040-Cygwin-spawn-Lock-cygheap-from-refresh_cygheap-until.patch deleted file mode 100644 index eb7e2ab2..00000000 --- a/msys2-runtime/0040-Cygwin-spawn-Lock-cygheap-from-refresh_cygheap-until.patch +++ /dev/null @@ -1,96 +0,0 @@ -From b1ea15e4849f1d106d34b4191a37cc0329c6df28 Mon Sep 17 00:00:00 2001 -From: Takashi Yano -Date: Sat, 19 Jul 2025 23:39:12 +0900 -Subject: [PATCH 40/N] Cygwin: spawn: Lock cygheap from refresh_cygheap() - until child_copy() - -...completion in child process because the cygheap should not be -changed to avoid mismatch between child_info::cygheap_max and -::cygheap_max. Otherwise, child_copy() might copy cygheap being -modified by other process. - -In addition, to avoid deadlock, move close_all_files() for non- -Cygwin processes after unlocking cygheap, since close_all_files() -calls cfree(), which attempts to lock cygheap even when it's already -locked. - -Fixes: 977ad5434cc0 ("* spawn.cc (spawn_guts): Call refresh_cygheap before creating a new process to ensure that cygheap_max is up-to-date.") -Reviewed-by: Corinna Vinschen -Signed-off-by: Takashi Yano -(cherry picked from commit 9b667234bfa6220dcca1afa1233a928d9100cfde) ---- - winsup/cygwin/spawn.cc | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc -index 854c25a..9ddfb5c 100644 ---- a/winsup/cygwin/spawn.cc -+++ b/winsup/cygwin/spawn.cc -@@ -572,7 +572,6 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, - ::cygheap->ctty ? ::cygheap->ctty->tc_getpgid () : 0; - if (!iscygwin () && ctty_pgid && ctty_pgid != myself->pgid) - c_flags |= CREATE_NEW_PROCESS_GROUP; -- refresh_cygheap (); - - if (mode == _P_DETACH) - /* all set */; -@@ -641,6 +640,8 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, - - cygpid = (mode != _P_OVERLAY) ? create_cygwin_pid () : myself->pid; - -+ cygheap->lock (); -+ refresh_cygheap (); - wchar_t wcmd[(size_t) cmd]; - if (!::cygheap->user.issetuid () - || (::cygheap->user.saved_uid == ::cygheap->user.real_uid -@@ -758,6 +759,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, - ::cygheap->user.reimpersonate (); - - res = -1; -+ cygheap->unlock (); - __leave; - } - -@@ -794,8 +796,6 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, - NtClose (old_winpid_hdl); - real_path.get_wide_win32_path (myself->progname); // FIXME: race? - sigproc_printf ("new process name %W", myself->progname); -- if (!iscygwin ()) -- close_all_files (); - } - else - { -@@ -811,6 +811,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, - if (get_errno () != ENOMEM) - set_errno (EAGAIN); - res = -1; -+ cygheap->unlock (); - __leave; - } - child->dwProcessId = pi.dwProcessId; -@@ -846,6 +847,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, - CloseHandle (pi.hProcess); - ForceCloseHandle (pi.hThread); - res = -1; -+ cygheap->unlock (); - __leave; - } - } -@@ -874,6 +876,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, - /* Just mark a non-cygwin process as 'synced'. We will still eventually - wait for it to exit in maybe_set_exit_code_from_windows(). */ - synced = iscygwin () ? sync (pi.dwProcessId, pi.hProcess, INFINITE) : true; -+ cygheap->unlock (); - - switch (mode) - { -@@ -890,8 +893,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, - } - else - { -- if (iscygwin ()) -- close_all_files (true); -+ close_all_files (iscygwin ()); - if (!my_wr_proc_pipe - && WaitForSingleObject (pi.hProcess, 0) == WAIT_TIMEOUT) - wait_for_myself (); diff --git a/msys2-runtime/0041-Cygwin-lock-cygheap-during-fork.patch b/msys2-runtime/0041-Cygwin-lock-cygheap-during-fork.patch deleted file mode 100644 index 425e5cba..00000000 --- a/msys2-runtime/0041-Cygwin-lock-cygheap-during-fork.patch +++ /dev/null @@ -1,47 +0,0 @@ -From dea57136f66ed290ae61b3bc8fe2625764c33bfc Mon Sep 17 00:00:00 2001 -From: Jeremy Drake -Date: Fri, 19 Sep 2025 13:36:30 -0700 -Subject: [PATCH 41/N] Cygwin: lock cygheap during fork - -another thread may simultaneously be doing a cmalloc/cfree while the -cygheap is being copied to the child. - -Addresses: https://cygwin.com/pipermail/cygwin/2025-September/258801.html -Signed-off-by: Jeremy Drake -(cherry picked from commit 8a5d39527f9a56d1a623e86d30af6b590fd1472d) ---- - winsup/cygwin/fork.cc | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc -index f88acdb..2aa5273 100644 ---- a/winsup/cygwin/fork.cc -+++ b/winsup/cygwin/fork.cc -@@ -329,6 +329,7 @@ frok::parent (volatile char * volatile stack_here) - /* NEVER, EVER, call a function which in turn calls malloc&friends while this - malloc lock is active! */ - __malloc_lock (); -+ cygheap->lock (); - bool locked = true; - - /* Remove impersonation */ -@@ -483,6 +484,7 @@ frok::parent (volatile char * volatile stack_here) - impure, impure_beg, impure_end, - NULL); - -+ cygheap->unlock (); - __malloc_unlock (); - locked = false; - if (!rc) -@@ -568,7 +570,10 @@ cleanup: - if (fix_impersonation) - cygheap->user.reimpersonate (); - if (locked) -- __malloc_unlock (); -+ { -+ cygheap->unlock (); -+ __malloc_unlock (); -+ } - - /* Remember to de-allocate the fd table. */ - if (hchild) diff --git a/msys2-runtime/PKGBUILD b/msys2-runtime/PKGBUILD index fe196bec..7483216d 100644 --- a/msys2-runtime/PKGBUILD +++ b/msys2-runtime/PKGBUILD @@ -3,8 +3,8 @@ pkgbase=msys2-runtime pkgname=('msys2-runtime' 'msys2-runtime-devel') -pkgver=3.6.4 -pkgrel=2 +pkgver=3.6.5 +pkgrel=1 pkgdesc="Cygwin POSIX emulation engine" arch=('x86_64') url="https://www.cygwin.com/" @@ -67,53 +67,47 @@ source=('msys2-runtime'::git://sourceware.org/git/newlib-cygwin.git#tag=cygwin-$ 0035-Revert-Cygwin-Enable-dynamicbase-on-the-Cygwin-DLL-b.patch 0036-Avoid-sharing-cygheaps-across-Cygwin-versions.patch 0037-uname-report-msys2-runtime-commit-hash-too.patch - 0038-Cygwin-Adjust-CWD-magic-to-accommodate-for-the-lates.patch - 0039-Cygwin-cygheap-Add-lock-unlock-method.patch - 0040-Cygwin-spawn-Lock-cygheap-from-refresh_cygheap-until.patch - 0041-Cygwin-lock-cygheap-during-fork.patch) -sha256sums=('e83966ff4a3e1d7ff8e58a023cc4a1ca6e1e6946e1b351904afb760e2707e9ad' - 'fa4edefea5f67a530264294282100a290d8232be0903a308eb46984a17074919' - 'e991209b72f626db6912ba3c2ef909f98e2ac76fd27d89d999345da55a9dcf25' - 'ce5e398a11e9479be68fe1fb748909278a7a9b2eb5bd080adfeef67a44bcac3c' - 'ed84840e8c11ec9ccfad75d2f77ca528eafd6316579023f0c4644c192b03bf03' - '961b1bc9278ae3a001480fb87363acdc813eaf2637bb3337d7d6e6c9f0268394' - '138cdf02a1794fd9efb5de22794515c0cac46cf03e2ae527298d432e4d8b254f' - '787e7100b10d52978db69e4429c399086172b38123a3a5355692dfe412ce29dc' - 'e2ebd3512f8177acd1eabfd56a2ec9289cb6d6b88012ee8cd32aaae3cc6eab87' - '4e7ca904e9466f87a7ec667c4994d3d277daa5e076d29ad55f128c325ed7883f' - '035bb42cdcc159f75a4271ad115fccd5e49f26fbbb226b3a206ed956d95f5dc7' - 'ae54f0c36465025bb63dcf1730639326af4189f92c1754990d15200054aa84ce' - 'a84805f21ec73e5b61a3b7657c6bb5e266aec86282e43b56f36fce05d938466b' - '2656c0f81c99d31b345668175043c1d50aadbb5837fb8fb39b7a9d059b2d98d4' - 'e37fb046c5432e1123f0b7cbfe50a6aa15cdbb2ffd2c503f6477bec22f1413a0' - '99455166024be888dc7b56dbdb26e0a3290df5095fd2f600d2260e1bd81cd133' - '951c9692cc87ca92ee35c04948509deb254650892936fc2618c8b2aca913d62e' - 'ce3bb50f82850db98ce0ce890bfbc1d950e8537e3c9095bc96711eb13c50c3a1' - '843fd48ff908f1365a6a88dc0fd93623e81067d1def2fc0120dc4f6ca8b80636' - '5116d021074d4fe35e053921f4b9e85216c2fe8c29798323d582c1f7916dd8b5' - 'aba160d0d238dc6e33273803d06d4196329623fc00dd7ab7bb7d3917763f2104' - '020cc1ce253a6d8cbd7d172007af19d6218b10b4112e91b75355d61bcf0c3945' - '04c361efadda6d8b937402169cf855ce3da7c361ef7b514e1de61e6443d0754f' - '8437811cfcfe40848b9f0a7407a541694024c6da09eecf091f61736d3210e419' - '01ad7f59ea6a1c4a8819bddd00f2952fb9c6c21cfb33fd0e9630e25b7daf0197' - '82c4aef2fb641eba1b148010288c008017359c342ad0a6ca68173366888412ff' - '43467ab24f6f7a0f8106f5d9b75002cf8306c320e5d05c4fa76c54b9ea0081fb' - '87d84972827b2c4aac609438338cb7c996e84e75509eca56c2b64c62939b176c' - '2d19929785668028f091601a9633b189aaea8601bb5fb879888080b82bb09f53' - '89e2d7a97bc1735111d4853edfb0f8521df7f7400c39aa8c1edacdcc60d4d2cd' - 'e448fc4c46ad66040837b9950bc790bae1533d83f53b0cfe7affa028496709b3' - '131fe78cabdc0b151c3204b5eec34f2d9504ba98e9cc377e2491f10cf84a45d1' - 'b4f73ec648d6d9c9552d624204e9ff6d0a779e53aded657ef6a7c1eb340d7ee2' - '987b0148328110b05957a8f18164ba663dba7f3e4056fbce25639a49be6e1af4' - '07e3334208f0da36be7d4fcef7136ce1f7b2093bb1f53b2bfdd414b6f8dc4902' - '9d584559e80b5f5022259766a2ad9bcb0547099cd1b09d18ae7b1436a0e9778e' - '3b063a27b1dd139acbd6171bcc2d2a2ce6fd97f258a0fd391cd9e5a40d7575d5' - 'a8071d3e3e5dc578f86143e881f4d408df4b0734086e2881e0766e8ae47690d8' - '2db7709613ff9b93c4dde91d45447122a69e7382123a671964ad8aabe6e6b71a' - '6bc0179ce0c3099365b49d0b45c4f4cb0aefe2f8f49cdb26f3205039d00d793e' - 'c94b68e24755aeac474d9d1e359b89efa93bdad4318813529f081503ba80a1ce' - '892727fd891928bf854b471c9ed449e177e7f1518faddf00fc30123293558d30' - 'bb8bcbf3b4c518da1b54c7eb880d9662f1aba19649b2b2492f296aea931768cc') + 0038-Cygwin-Adjust-CWD-magic-to-accommodate-for-the-lates.patch) +sha256sums=('a47fbb6b35c13af8cb95e518a66316615a0e1bade268a42b5cd813cbe247178e' + 'f388ec0536c2918fedbb7034089f64a5c4294f8f51168ad2b87e2d059a984d79' + 'bae2d143778f820633d7716608ddf47fab7305f65b7a97fa159ef9b6b8ece20b' + '423bd5f9980f4435a1f287b127cebf27bcd46e8ee868a6988c89a30a464f48a7' + 'd2da62de25a8cb2ccc824e2b47b82863bc4a2d81790109e44f464c9e99fd1518' + '91500762f7bfc5b05e4d62691ef4450c343bbfe41cac0c5762728870eb658b3f' + '3dafd722d9b665a64d0d4584994460a523ccd25002afae9f9b227dbd28452814' + 'bc114bc93903b4c0c2d68938f505f8e26b5ea0498cf18b426484c182b8c17676' + 'e65d5ee9c43a331938a5e0af6ab4c7cf6d19e90db1cb8ecb6643279a2d6c3b86' + '5bfbf6580b3f30a69256623189d3f4decedca7181508db797e37276dd183ad72' + '8083993a00736e644119bbdcab48b5b97ca946c41a0ecfd8e52e91ffdf694d51' + '621e24a8eb5c7a49ec724d19f69291a957e2ac8be311fd30bb3f24b5b1f19dca' + '164907b84412a9fe9cc95732208c680a8dfc3796bdde431593ce7a084db1bc1f' + 'ce49aec82a7b4d4a836eea6d4d846988a6f18f4facbd6ee92b463e66f525c984' + 'b7779f6a7495f655e28f050c4eefb2c48c7a7711f812fb434b6f33f3079d711b' + '40d286d959f8aae25b49797e167b0106232b8f4ee977c5b72920623f05615222' + '95d570360350a8b46960b108a9490d36e6ea06ea903bc3c3b17f37ee25a79fdd' + 'da30cb3fc16077259455f4a3748b2c88e2e3e3066baf4749dd272ddc12524fe5' + 'f02d7101d68dafcd8a23e20f84c3ad969b654032bd6ede1cadb86e77e14cd773' + 'cc76e290d1ffd698af033df74169e09f986e9a888113b524bc77efd18cf352e9' + 'b50bae5f30b0b767b4132721c89587707ebf44860eef1445c9faad6776881246' + '5c5f0eb7949dea005b7f15b5dea0625a73d466bfe1a9f732a002466e49c14d78' + '493a76535fb322f512996a802c82453339fd879d8ee2ea4c34db697e9a7d5ccf' + '91c3a29d62315f6065269141beb17190e13a8d471bce14bdd624649cdb2f5a05' + 'ae5693a4f2facd200641338ee3beb73443a08b33dc2e11f76fbba7b6576bda28' + '7c9045d11fcad76464dfe12dd24eb112f3a24cc9982638cdb1055e32dfa405b9' + 'cbcb4698b9a3cf50a4ec49d3dd2527025a889fd4ce45f4ad7a7fb3e450dc6e43' + '4faff2d08016e59a26c91c82a4f46a34814be50bd35fa3aa4659fa1e51818ee0' + '6418567b17227f9bc496672a181ad611a48068ef3687441c0d51a76875b708df' + '5253c305ec668f1fb31a32fdc850880ba2ea0314917539c791acfc8c617ba548' + '743bb4c465a7294246fa20bbfe9b2ae82cad2dbad850c4b27d22d414448978b8' + 'b25d0f3074cb850d71db7ccaee5bb3b50fc3f64ed25214fc5dad24418967124d' + '8e7b50b0c1dc3b077340d1cb36bd0856ee29583ded765871314f524fbca9b1e5' + '03186999a8d0bafdd667369074f76439f5fae6191fc6feecce53f0bb3edb2245' + '4495b6d42fcf4db764f304b34ea6df5fe0ca14c0d484594e3a11f13a49205f92' + 'a3d2c643d8953c342561662f6c70a215c6666f105283eb1874f8369ad4b05cf1' + '4e1662fa4bdf29b21838dec97bee1483624e39ef897ed84ee94943ea2a4354f5' + 'ca5c957460f29831531be706a94a1392deece1ff2077d54e8db3f033b0261570' + '28c3699d61897c9dde236e703f2c3d2f62e8af116f83b85589518207a7b01bcc' + 'a45ed0d773c10468a87bfbd5a5a04d5f2aa489ca1f82827c94687b278448f436') # Helper macros to help make tasks easier # apply_patch_with_msg() { @@ -189,10 +183,7 @@ prepare() { 0035-Revert-Cygwin-Enable-dynamicbase-on-the-Cygwin-DLL-b.patch \ 0036-Avoid-sharing-cygheaps-across-Cygwin-versions.patch \ 0037-uname-report-msys2-runtime-commit-hash-too.patch \ - 0038-Cygwin-Adjust-CWD-magic-to-accommodate-for-the-lates.patch \ - 0039-Cygwin-cygheap-Add-lock-unlock-method.patch \ - 0040-Cygwin-spawn-Lock-cygheap-from-refresh_cygheap-until.patch \ - 0041-Cygwin-lock-cygheap-during-fork.patch + 0038-Cygwin-Adjust-CWD-magic-to-accommodate-for-the-lates.patch } build() { diff --git a/msys2-runtime/msys2-runtime.commit b/msys2-runtime/msys2-runtime.commit index 9dd8d054..328c8817 100644 --- a/msys2-runtime/msys2-runtime.commit +++ b/msys2-runtime/msys2-runtime.commit @@ -1 +1 @@ -dea57136f66ed290ae61b3bc8fe2625764c33bfc +0eeda3e131b580df38367f3c71df2cea2c18ee50