diff --git a/msys2-runtime-3.4/0.patch b/msys2-runtime-3.4/0.patch new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/msys2-runtime/0001-Add-MSYS2-triplet.patch b/msys2-runtime/0001-Add-MSYS2-triplet.patch index 9ecb9e3ea0fe..53d9b605d7a2 100644 --- a/msys2-runtime/0001-Add-MSYS2-triplet.patch +++ b/msys2-runtime/0001-Add-MSYS2-triplet.patch @@ -1,4 +1,4 @@ -From ea4541258abac6b47a0dfaf0ed48e07cc7d19caa Mon Sep 17 00:00:00 2001 +From 032b7eaf846d924ca1b12444388debe4d51ae382 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 20:40:45 +0300 @@ -197,10 +197,10 @@ index 4542a4b..209bd8d 100644 esac if test x"${ac_cv_c_tkconfig}" = x ; then diff --git a/configure b/configure -index eb0ba84..0badc34 100755 +index 9477153..1474838 100755 --- a/configure +++ b/configure -@@ -3074,7 +3074,7 @@ fi +@@ -3088,7 +3088,7 @@ fi # Configure extra directories which are host specific case "${host}" in @@ -209,7 +209,7 @@ index eb0ba84..0badc34 100755 configdirs="$configdirs libtermcap" ;; esac -@@ -3595,7 +3595,7 @@ esac +@@ -3609,7 +3609,7 @@ esac # Disable the go frontend on systems where it is known to not work. Please keep # this in sync with contrib/config-list.mk. case "${target}" in @@ -218,7 +218,7 @@ index eb0ba84..0badc34 100755 unsupported_languages="$unsupported_languages go" ;; esac -@@ -3608,7 +3608,7 @@ if test x$enable_libgo = x; then +@@ -3622,7 +3622,7 @@ if test x$enable_libgo = x; then # PR 46986 noconfigdirs="$noconfigdirs target-libgo" ;; @@ -227,7 +227,7 @@ index eb0ba84..0badc34 100755 noconfigdirs="$noconfigdirs target-libgo" ;; *-*-aix*) -@@ -3880,7 +3880,7 @@ case "${target}" in +@@ -3894,7 +3894,7 @@ case "${target}" in i[3456789]86-*-mingw*) target_configdirs="$target_configdirs target-winsup" ;; @@ -236,7 +236,7 @@ index eb0ba84..0badc34 100755 target_configdirs="$target_configdirs target-libtermcap target-winsup" noconfigdirs="$noconfigdirs target-libgloss" # always build newlib if winsup directory is present. -@@ -4024,7 +4024,7 @@ case "${host}" in +@@ -4038,7 +4038,7 @@ case "${host}" in i[3456789]86-*-msdosdjgpp*) host_makefile_frag="config/mh-djgpp" ;; @@ -245,7 +245,7 @@ index eb0ba84..0badc34 100755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if cat works as expected" >&5 $as_echo_n "checking to see if cat works as expected... " >&6; } -@@ -6192,7 +6192,7 @@ fi +@@ -6206,7 +6206,7 @@ fi target_elf=no case $target in @@ -254,7 +254,7 @@ index eb0ba84..0badc34 100755 *-msdosdjgpp* | *-vms* | *-wince* | *-*-pe* | \ alpha*-dec-osf* | hppa[12]*-*-hpux* | \ nvptx-*-none) -@@ -6210,7 +6210,7 @@ if test $target_elf = yes; then : +@@ -6224,7 +6224,7 @@ if test $target_elf = yes; then : else if test x"$default_enable_lto" = x"yes" ; then case $target in @@ -263,7 +263,7 @@ index eb0ba84..0badc34 100755 # On other non-ELF platforms, LTO has yet to be validated. *) enable_lto=no ;; esac -@@ -6221,7 +6221,7 @@ else +@@ -6235,7 +6235,7 @@ else # warn during gcc/ subconfigure; unless you're bootstrapping with # -flto it won't be needed until after installation anyway. case $target in @@ -272,7 +272,7 @@ index eb0ba84..0badc34 100755 *) if test x"$enable_lto" = x"yes"; then as_fn_error $? "LTO support is not enabled for this target." "$LINENO" 5 fi -@@ -6231,7 +6231,7 @@ else +@@ -6245,7 +6245,7 @@ else # Among non-ELF, only Windows platforms support the lto-plugin so far. # Build it unless LTO was explicitly disabled. case $target in @@ -281,7 +281,7 @@ index eb0ba84..0badc34 100755 *) ;; esac -@@ -7102,7 +7102,7 @@ rm -f conftest* +@@ -7130,7 +7130,7 @@ rm -f conftest* case "${host}" in *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;; *-*-darwin*) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;; @@ -290,7 +290,7 @@ index eb0ba84..0badc34 100755 *) RPATH_ENVVAR=LD_LIBRARY_PATH ;; esac -@@ -7620,7 +7620,7 @@ case " $target_configdirs " in +@@ -7648,7 +7648,7 @@ case " $target_configdirs " in case " $target_configargs " in *" --with-newlib "*) case "$target" in @@ -300,7 +300,7 @@ index eb0ba84..0badc34 100755 ;; esac diff --git a/configure.ac b/configure.ac -index f1bb721..f7fc8e9 100644 +index 05ddf69..3ed8a1b 100644 --- a/configure.ac +++ b/configure.ac @@ -409,7 +409,7 @@ AC_ARG_ENABLE(compressed_debug_sections, @@ -375,7 +375,7 @@ index f1bb721..f7fc8e9 100644 *) ;; esac ]) -@@ -2644,7 +2644,7 @@ rm -f conftest* +@@ -2652,7 +2652,7 @@ rm -f conftest* case "${host}" in *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;; *-*-darwin*) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;; @@ -384,7 +384,7 @@ index f1bb721..f7fc8e9 100644 *) RPATH_ENVVAR=LD_LIBRARY_PATH ;; esac -@@ -3157,7 +3157,7 @@ case " $target_configdirs " in +@@ -3165,7 +3165,7 @@ case " $target_configdirs " in case " $target_configargs " in *" --with-newlib "*) case "$target" in @@ -795,10 +795,10 @@ index 5ef12ce..5e7bc34 100644 AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) diff --git a/newlib/configure b/newlib/configure -index 0b6ec15..d3171b4 100755 +index 6a542bb..00de6b9 100755 --- a/newlib/configure +++ b/newlib/configure -@@ -4269,7 +4269,7 @@ else +@@ -4283,7 +4283,7 @@ else fi @@ -808,10 +808,10 @@ index 0b6ec15..d3171b4 100755 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' diff --git a/newlib/configure.host b/newlib/configure.host -index 32d1436..4e4c393 100644 +index 3861834..2023e58 100644 --- a/newlib/configure.host +++ b/newlib/configure.host -@@ -194,7 +194,7 @@ case "${host_cpu}" in +@@ -195,7 +195,7 @@ case "${host_cpu}" in shared_machine_dir=shared_x86 # Don't use for these since they provide their own setjmp. case ${host} in @@ -820,7 +820,7 @@ index 32d1436..4e4c393 100644 ;; *) mach_add_setjmp=true -@@ -399,7 +399,7 @@ fi +@@ -407,7 +407,7 @@ fi if [ "x${newlib_mb}" = "x" ]; then case "${host}" in @@ -829,7 +829,7 @@ index 32d1436..4e4c393 100644 newlib_mb=yes ;; esac -@@ -418,7 +418,7 @@ fi +@@ -426,7 +426,7 @@ fi # THIS TABLE IS ALPHA SORTED. KEEP IT THAT WAY. case "${host}" in @@ -838,7 +838,7 @@ index 32d1436..4e4c393 100644 posix_dir=posix xdr_dir=xdr ;; -@@ -578,7 +578,7 @@ esac +@@ -589,7 +589,7 @@ esac # THIS TABLE IS ALPHA SORTED. KEEP IT THAT WAY. case "${host}" in diff --git a/msys2-runtime/0002-Fix-msys-library-name-in-import-libraries.patch b/msys2-runtime/0002-Fix-msys-library-name-in-import-libraries.patch index e1ba3c09923b..5f6f0430ec09 100644 --- a/msys2-runtime/0002-Fix-msys-library-name-in-import-libraries.patch +++ b/msys2-runtime/0002-Fix-msys-library-name-in-import-libraries.patch @@ -1,4 +1,4 @@ -From 4fdf75c097dde04f825e2a8a433d28f7cf54e3ae Mon Sep 17 00:00:00 2001 +From b5b80682eacdb0a52c6a9bb5e2626ffb4610971c Mon Sep 17 00:00:00 2001 From: Kaleb Barrett Date: Sun, 14 Mar 2021 18:58:55 -0500 Subject: [PATCH 02/N] Fix msys library name in import libraries @@ -13,7 +13,7 @@ against `msys_2_0.dll` to correctly link against `msys-2.0.dll` instead. 1 file changed, 1 insertion(+) diff --git a/winsup/cygwin/scripts/speclib b/winsup/cygwin/scripts/speclib -index e6d4d8e..4dcadcb 100755 +index 41a3a8e..42a02c5 100755 --- a/winsup/cygwin/scripts/speclib +++ b/winsup/cygwin/scripts/speclib @@ -38,6 +38,7 @@ while (<$nm_fd>) { diff --git a/msys2-runtime/0003-Rename-dll-from-cygwin-to-msys.patch b/msys2-runtime/0003-Rename-dll-from-cygwin-to-msys.patch index f3a4ef63f130..d0e36eaf2fb4 100644 --- a/msys2-runtime/0003-Rename-dll-from-cygwin-to-msys.patch +++ b/msys2-runtime/0003-Rename-dll-from-cygwin-to-msys.patch @@ -1,4 +1,4 @@ -From 5f85b84acafc0ad5d31ba8501239e47ebdbe265f Mon Sep 17 00:00:00 2001 +From a282a19dd1d4ea11e7092884b365fe59c358f180 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 @@ -8,7 +8,7 @@ Subject: [PATCH 03/N] Rename dll from cygwin to msys winsup/Makefile.am | 2 +- winsup/cygserver/Makefile.am | 2 +- winsup/cygserver/transport_pipes.h | 4 ++ - winsup/cygwin/Makefile.am | 35 +++++++-------- + winsup/cygwin/Makefile.am | 27 ++++++------ winsup/cygwin/crt0.c | 8 ++++ winsup/cygwin/cygthread.cc | 2 +- winsup/cygwin/cygwin.din | 6 +-- @@ -36,19 +36,16 @@ Subject: [PATCH 03/N] Rename dll from cygwin to msys winsup/cygwin/syscalls.cc | 4 +- winsup/cygwin/syslog.cc | 4 ++ winsup/cygwin/winver.rc | 2 +- - winsup/testsuite/config/default.exp | 8 ++-- - winsup/testsuite/cygrun.c | 6 +-- + winsup/testsuite/cygrun.c | 2 +- winsup/testsuite/winsup.api/cygload.cc | 12 +++--- - winsup/testsuite/winsup.api/cygload.exp | 2 +- winsup/testsuite/winsup.api/cygload.h | 2 +- - winsup/testsuite/winsup.api/winsup.exp | 2 +- winsup/utils/ldd.cc | 2 +- winsup/utils/loadlib.h | 6 +-- winsup/utils/mingw/cygcheck.cc | 43 +++++++++---------- winsup/utils/mingw/strace.cc | 11 +++-- winsup/utils/path.cc | 12 +++--- winsup/utils/ssp.c | 8 ++-- - 43 files changed, 209 insertions(+), 107 deletions(-) + 40 files changed, 197 insertions(+), 95 deletions(-) diff --git a/winsup/Makefile.am b/winsup/Makefile.am index 9efdd4c..0946152 100644 @@ -93,10 +90,10 @@ 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 167be81..a57d228 100644 +index 376c79f..e65e675 100644 --- a/winsup/cygwin/Makefile.am +++ b/winsup/cygwin/Makefile.am -@@ -37,13 +37,13 @@ newlib_build=$(target_builddir)/newlib +@@ -37,12 +37,12 @@ newlib_build=$(target_builddir)/newlib toollibdir=$(tooldir)/lib toolincludedir=$(tooldir)/include @@ -107,23 +104,21 @@ index 167be81..a57d228 100644 -NEW_DLL_NAME=new-cygwin1.dll -DEF_FILE=cygwin.def -LIB_NAME=libcygwin.a --TEST_LIB_NAME=libcygwin0.a +DLL_NAME=msys-2.0.dll +NEW_DLL_NAME=new-msys-2.0.dll +DEF_FILE=msys.def +LIB_NAME=libmsys-2.0.a -+TEST_LIB_NAME=libmsys0.a # # sources -@@ -570,32 +570,32 @@ LIBSERVER = $(cygserver_blddir)/libcygserver.a +@@ -584,16 +584,16 @@ LIBSERVER = $(cygserver_blddir)/libcygserver.a $(LIBSERVER): $(MAKE) -C $(cygserver_blddir) libcygserver.a --# We build as cygwin0.dll and rename at install time to overcome native -+# We build as msys-2.0.dll and rename at install time to overcome native +-# We build as new-cygwin1.dll and rename at install time to overcome native ++# We build as new-msys-2.0.dll and rename at install time to overcome native # rebuilding issues (we don't want the build tools to see a partially built --# cygwin.dll and attempt to use it instead of the old one). +-# cygwin1.dll and attempt to use it instead of the old one). +# msys-2.0.dll and attempt to use it instead of the old one). # linker script @@ -133,12 +128,13 @@ index 167be81..a57d228 100644 -# cygwin dll +# msys-2.0 dll + # Set PE and export table header timestamps to zero for reproducible builds. $(NEW_DLL_NAME): $(LDSCRIPT) libdll.a $(VERSION_OFILES) $(LIBSERVER)\ $(newlib_build)/libm.a $(newlib_build)/libc.a - $(AM_V_CXXLD)$(CXX) $(CXXFLAGS) \ - -mno-use-libstdc-wrappers \ +@@ -602,18 +602,18 @@ $(NEW_DLL_NAME): $(LDSCRIPT) libdll.a $(VERSION_OFILES) $(LIBSERVER)\ -Wl,--gc-sections -nostdlib -Wl,-T$(LDSCRIPT) \ -Wl,--dynamicbase -static \ + $${SOURCE_DATE_EPOCH:+-Wl,--no-insert-timestamp} \ - -Wl,--heap=0 -Wl,--out-implib,cygdll.a -shared -o $@ \ + -Wl,--heap=0 -Wl,--out-implib,msysdll.a -shared -o $@ \ -e @DLL_ENTRY@ $(DEF_FILE) \ @@ -149,25 +145,21 @@ index 167be81..a57d228 100644 $(newlib_build)/libc.a \ - -lgcc -lkernel32 -lntdll -Wl,-Map,cygwin.map + -lgcc -lkernel32 -lntdll -Wl,-Map,msys.map + @$(MKDIR_P) ${target_builddir}/winsup/testsuite/testinst/bin/ + $(AM_V_at)$(INSTALL_PROGRAM) $(NEW_DLL_NAME) ${target_builddir}/winsup/testsuite/testinst/bin/$(DLL_NAME) -# cygwin import library +# msys-2.0 import library toolopts=--cpu=@target_cpu@ --ar=@AR@ --as=@AS@ --nm=@NM@ --objcopy=@OBJCOPY@ $(DEF_FILE): scripts/gendef cygwin.din -@@ -608,17 +608,18 @@ sigfe.s: $(DEF_FILE) tlsoffsets +@@ -626,13 +626,14 @@ sigfe.s: $(DEF_FILE) tlsoffsets LIBCOS=$(addsuffix .o,$(basename $(LIB_FILES))) $(LIB_NAME): $(DEF_FILE) $(LIBCOS) | $(NEW_DLL_NAME) - $(AM_V_GEN)$(srcdir)/scripts/mkimport $(toolopts) $(NEW_FUNCTIONS) $@ cygdll.a $(wordlist 2,99,$^) + $(AM_V_GEN)$(srcdir)/scripts/mkimport $(toolopts) $(NEW_FUNCTIONS) $@ msysdll.a $(wordlist 2,99,$^) --# cygwin import library used by testsuite -+# msys-2.0 import library used by testsuite - $(TEST_LIB_NAME): $(LIB_NAME) -- $(AM_V_GEN)perl -p -e 'BEGIN{binmode(STDIN); binmode(STDOUT);}; s/cygwin1/cygwin0/g' < $? > $@ -+ $(AM_V_GEN)perl -p -e 'BEGIN{binmode(STDIN); binmode(STDOUT);}; s/msys-2.0/msys0/g' < $? > $@ - # sublibs # import libraries for some subset of symbols indicated by given objects speclib=\ @@ -177,24 +169,15 @@ index 167be81..a57d228 100644 --exclude='(?i:dll)' \ --exclude='reloc' \ --exclude='^main$$' \ -@@ -665,7 +666,7 @@ all-local: $(LIB_NAME) $(TEST_LIB_NAME) $(SUBLIBS) +@@ -679,7 +680,7 @@ all-local: $(LIB_NAME) $(SUBLIBS) clean-local: -rm -f $(BUILT_SOURCES) -rm -f $(DEF_FILE) sigfe.s - -rm -f cygwin.sc cygdll.a cygwin.map + -rm -f cygwin.sc msysdll.a msys.map -rm -f $(NEW_DLL_NAME) - -rm -f $(LIB_NAME) $(TEST_LIB_NAME) $(SUBLIBS) + -rm -f $(LIB_NAME) $(SUBLIBS) -rm -f version.cc -@@ -709,7 +710,7 @@ install-ldif: - uninstall-hook: uninstall-headers uninstall-ldif uninstall-libs - - uninstall-libs: -- rm -f $(DESTDIR)$(bindir)/cygwin1.dll -+ rm -f $(DESTDIR)$(bindir)/msys-2.0.dll - rm -f $(DESTDIR)$(toollibdir)/libg.a - - uninstall-headers: diff --git a/winsup/cygwin/crt0.c b/winsup/cygwin/crt0.c index 1096e58..3160df4 100644 --- a/winsup/cygwin/crt0.c @@ -234,7 +217,7 @@ index 54918e7..518d11f 100644 else thread_printf ("overflowed cygwin thread pool"); diff --git a/winsup/cygwin/cygwin.din b/winsup/cygwin/cygwin.din -index c70380f..71f3a68 100644 +index 9e354ac..76e88df 100644 --- a/winsup/cygwin/cygwin.din +++ b/winsup/cygwin/cygwin.din @@ -1,4 +1,4 @@ @@ -243,7 +226,7 @@ index c70380f..71f3a68 100644 EXPORTS # Exported variables -@@ -401,8 +401,8 @@ cygwin_attach_handle_to_fd SIGFE +@@ -404,8 +404,8 @@ cygwin_attach_handle_to_fd SIGFE cygwin_conv_path SIGFE cygwin_conv_path_list SIGFE cygwin_create_path SIGFE @@ -270,7 +253,7 @@ index 69526f5..4dc5dae 100644 #error unimplemented for this target #endif diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc -index 130d652..b40697a 100644 +index fc1eec7..5644cc9 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -376,12 +376,12 @@ check_sanity_and_sync (per_process *p) @@ -315,7 +298,7 @@ index 130d652..b40697a 100644 { static int _fmode; -@@ -1276,7 +1280,7 @@ multiple_cygwin_problem (const char *what, uintptr_t magic_version, uintptr_t ve +@@ -1274,7 +1278,7 @@ multiple_cygwin_problem (const char *what, uintptr_t magic_version, uintptr_t ve return; } @@ -324,7 +307,7 @@ index 130d652..b40697a 100644 return; if (CYGWIN_VERSION_MAGIC_VERSION (magic_version) == version) -@@ -1296,7 +1300,7 @@ are unable to find another cygwin DLL.", +@@ -1294,7 +1298,7 @@ are unable to find another cygwin DLL.", void cygbench (const char *s) { @@ -352,7 +335,7 @@ index fb70524..7367d29 100644 /* ... using original basename with new suffix. */ basenames.appendv (basename, baselen, ext, extlen, NULL); diff --git a/winsup/cygwin/dll_init.cc b/winsup/cygwin/dll_init.cc -index b486eaa..03e5191 100644 +index 1a04751..7c5f8cc 100644 --- a/winsup/cygwin/dll_init.cc +++ b/winsup/cygwin/dll_init.cc @@ -874,7 +874,11 @@ dll_dllcrt0_1 (VOID *x) @@ -368,10 +351,10 @@ index b486eaa..03e5191 100644 HANDLE retaddr; if (_my_tls.isinitialized ()) diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc -index 8ebd7b2..2185a84 100644 +index 9508f3e..3c40e0f 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc -@@ -992,9 +992,15 @@ handle_to_fn (HANDLE h, char *posix_fn) +@@ -998,9 +998,15 @@ handle_to_fn (HANDLE h, char *posix_fn) if (wcsncasecmp (w32, DEV_NAMED_PIPE, DEV_NAMED_PIPE_LEN) == 0) { w32 += DEV_NAMED_PIPE_LEN; @@ -388,10 +371,10 @@ index 8ebd7b2..2185a84 100644 w32len = cygheap->installation_key.Length / sizeof (WCHAR); if (w32len diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc -index c3433ab..b154a3b 100644 +index a2a6f9d..b369799 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc -@@ -495,14 +495,14 @@ try_to_debug () +@@ -526,14 +526,14 @@ int exec_prepared_command (PWCHAR command) PWCHAR rawenv = GetEnvironmentStringsW () ; for (PWCHAR p = rawenv; *p != L'\0'; p = wcschr (p, L'\0') + 1) { @@ -409,7 +392,7 @@ index c3433ab..b154a3b 100644 break; } diff --git a/winsup/cygwin/fhandler/pipe.cc b/winsup/cygwin/fhandler/pipe.cc -index e231316..283319c 100644 +index 1a97108..e19457f 100644 --- a/winsup/cygwin/fhandler/pipe.cc +++ b/winsup/cygwin/fhandler/pipe.cc @@ -671,7 +671,11 @@ fhandler_pipe::close () @@ -425,7 +408,7 @@ index e231316..283319c 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 aff899b..dbeffc9 100644 +index 3f4bc56..a09dfd4 100644 --- a/winsup/cygwin/fhandler/pty.cc +++ b/winsup/cygwin/fhandler/pty.cc @@ -927,7 +927,11 @@ fhandler_pty_slave::open (int flags, mode_t) @@ -452,7 +435,7 @@ index aff899b..dbeffc9 100644 &cygheap->installation_key, get_minor ()); pipe_request req = { GetCurrentProcessId () }; pipe_reply repl; -@@ -2081,7 +2089,11 @@ fhandler_pty_master::close () +@@ -2082,7 +2090,11 @@ fhandler_pty_master::close () pipe_reply repl; DWORD len; @@ -476,7 +459,7 @@ index aff899b..dbeffc9 100644 &cygheap->installation_key, unit); master_ctl = CreateNamedPipe (buf, PIPE_ACCESS_DUPLEX | FILE_FLAG_FIRST_PIPE_INSTANCE, -@@ -3904,7 +3920,11 @@ fhandler_pty_slave::transfer_input (tty::xfer_dir dir, HANDLE from, tty *ttyp, +@@ -3853,7 +3869,11 @@ fhandler_pty_slave::transfer_input (tty::xfer_dir dir, HANDLE from, tty *ttyp, { char pipe[MAX_PATH]; __small_sprintf (pipe, @@ -489,7 +472,7 @@ index aff899b..dbeffc9 100644 pipe_request req = { GetCurrentProcessId () }; pipe_reply repl; diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc -index e553c01..0dac93f 100644 +index 0742ab3..3e08419 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -158,7 +158,7 @@ frok::child (volatile char * volatile here) @@ -560,10 +543,10 @@ index 1e4cf98..b77598b 100644 } \ } \ diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h -index 79c7fc1..f3c93e1 100644 +index 4122125..69851a1 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h -@@ -496,7 +496,11 @@ details. */ +@@ -502,7 +502,11 @@ details. */ names include the CYGWIN_VERSION_SHARED_DATA version as well as this identifier. */ @@ -575,7 +558,7 @@ index 79c7fc1..f3c93e1 100644 /* The Cygwin mount table interface in the Win32 registry also has a version number associated with it in case that is changed in a non-backwards -@@ -512,7 +516,11 @@ details. */ +@@ -518,7 +522,11 @@ details. */ /* Identifiers used in the Win32 registry. */ @@ -680,7 +663,7 @@ index fc1576b..b297511 100644 #ifndef __INSIDE_CYGWIN__ class transport_layer_base; diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc -index 8dc46ee..753d415 100644 +index bfd338e..12e88c8 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -194,7 +194,7 @@ pinfo::maybe_set_exit_code_from_windows () @@ -706,7 +689,7 @@ index 5a0eab9..895cacd 100644 va_list args; diff --git a/winsup/cygwin/scripts/mkvers.sh b/winsup/cygwin/scripts/mkvers.sh -index 96af936..98826f8 100755 +index 38f439c..a3d45c5 100755 --- a/winsup/cygwin/scripts/mkvers.sh +++ b/winsup/cygwin/scripts/mkvers.sh @@ -123,7 +123,7 @@ dir=$(echo $dir | sed -e 's%/include/cygwin.*$%%' -e 's%include/cygwin.*$%.%') @@ -767,10 +750,10 @@ index 43b5803..db1d5c8 100644 ts.SourceIdentifier.LowPart = kerberos_auth ? 0x0105 : 0x0106; diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc -index bc32323..91b86bf 100644 +index 9d88b60..ed564c8 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc -@@ -297,7 +297,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access, ULONG flags) +@@ -339,7 +339,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access, ULONG flags) } else { @@ -779,7 +762,7 @@ index bc32323..91b86bf 100644 transposed into the Unicode low surrogate area (U+dc00) on file systems supporting Unicode (except Samba), followed by the inode number in hex, followed by a path hash in hex. The combination -@@ -305,7 +305,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access, ULONG flags) +@@ -347,7 +347,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access, ULONG flags) RtlAppendUnicodeToString (&recycler, (pc.fs_flags () & FILE_UNICODE_ON_DISK && !pc.fs_is_samba ()) @@ -817,52 +800,21 @@ index 980d512..58878d4 100644 VALUE "ProductVersion", STRINGIFY(CYGWIN_VERSION) VALUE "APIVersion", CYGWIN_API_VERSION VALUE "SharedMemoryVersion", STRINGIFY(CYGWIN_VERSION_SHARED_DATA) -diff --git a/winsup/testsuite/config/default.exp b/winsup/testsuite/config/default.exp -index 7ef16ee..fd592c3 100644 ---- a/winsup/testsuite/config/default.exp -+++ b/winsup/testsuite/config/default.exp -@@ -1,11 +1,11 @@ - proc winsup_version {} { - global env - global runtime_root -- clone_output "\n[exec grep -a ^%%% $runtime_root/cygwin0.dll]\n" -- if { [info exists env(CYGWIN)] } { -- clone_output "CYGWIN=$env(CYGWIN)\n" -+ clone_output "\n[exec grep -a ^%%% $runtime_root/msys0.dll]\n" -+ if { [info exists env(MSYS)] } { -+ clone_output "MSYS=$env(MSYS)\n" - } else { -- clone_output "CYGWIN=\n" -+ clone_output "MSYS=\n" - } - } - diff --git a/winsup/testsuite/cygrun.c b/winsup/testsuite/cygrun.c -index 65d859d..616b043 100644 +index 50c5187..af01b64 100644 --- a/winsup/testsuite/cygrun.c +++ b/winsup/testsuite/cygrun.c -@@ -32,8 +32,8 @@ main (int argc, char **argv) - if (argc >= 3) - SetEnvironmentVariable ("TDIRECTORY", argv[2]); +@@ -47,7 +47,7 @@ main (int argc, char **argv) + exit (1); + } - SetEnvironmentVariable ("CYGWIN_TESTING", "1"); -- if ((p = getenv ("CYGWIN")) == NULL || (strstr (p, "ntsec") == NULL)) + SetEnvironmentVariable ("MSYS_TESTING", "1"); -+ if ((p = getenv ("MSYS")) == NULL || (strstr (p, "ntsec") == NULL)) - { - char buf[4096]; - if (!p) -@@ -47,7 +47,7 @@ main (int argc, char **argv) - strcat (buf, " "); - } - strcat(buf, "ntsec"); -- SetEnvironmentVariable ("CYGWIN", buf); -+ SetEnvironmentVariable ("MSYS", buf); - } memset (&sa, 0, sizeof (sa)); + memset (&pi, 0, sizeof (pi)); diff --git a/winsup/testsuite/winsup.api/cygload.cc b/winsup/testsuite/winsup.api/cygload.cc -index f5ca8db..510a627 100644 +index afd3ee9..59eac89 100644 --- a/winsup/testsuite/winsup.api/cygload.cc +++ b/winsup/testsuite/winsup.api/cygload.cc @@ -25,7 +25,7 @@ @@ -911,21 +863,8 @@ index f5ca8db..510a627 100644 out = &output; -diff --git a/winsup/testsuite/winsup.api/cygload.exp b/winsup/testsuite/winsup.api/cygload.exp -index 8ba8249..500683e 100644 ---- a/winsup/testsuite/winsup.api/cygload.exp -+++ b/winsup/testsuite/winsup.api/cygload.exp -@@ -32,7 +32,7 @@ if { $rv != {0 {}} } { - set redirect_output /dev/null - } - set windows_runtime_root [exec cygpath -m $runtime_root] -- ws_spawn "./mingw-cygload.exe -cygwin $windows_runtime_root/cygwin0.dll > $redirect_output" -+ ws_spawn "./mingw-cygload.exe -cygwin $windows_runtime_root/msys0.dll > $redirect_output" - if { $rv != {0 {}} } { - verbose -log "cygload: $rv" - fail "cygload (execute)" diff --git a/winsup/testsuite/winsup.api/cygload.h b/winsup/testsuite/winsup.api/cygload.h -index 8007fd5..ab4003b 100644 +index 3015404..0f2aacd 100644 --- a/winsup/testsuite/winsup.api/cygload.h +++ b/winsup/testsuite/winsup.api/cygload.h @@ -76,7 +76,7 @@ namespace cygwin @@ -937,19 +876,6 @@ index 8007fd5..ab4003b 100644 ~connector (); // A wrapper around GetProcAddress() for fetching symbols from the -diff --git a/winsup/testsuite/winsup.api/winsup.exp b/winsup/testsuite/winsup.api/winsup.exp -index 584aa57..bc05713 100644 ---- a/winsup/testsuite/winsup.api/winsup.exp -+++ b/winsup/testsuite/winsup.api/winsup.exp -@@ -61,7 +61,7 @@ foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c $srcdir/$subdir/*/*.{cc - if [ file exists "$srcdir/$subdir/$basename.exp" ] then { - source "$srcdir/$subdir/$basename.exp" - } else { -- ws_spawn "$CC -nodefaultlibs -mwin32 $CFLAGS $src $add_includes $add_libs $runtime_root/binmode.o -lgcc $runtime_root/libcygwin0.a -lkernel32 -luser32 -o $base.exe" -+ ws_spawn "$CC -nodefaultlibs -mwin32 $CFLAGS $src $add_includes $add_libs $runtime_root/binmode.o -lgcc $runtime_root/libmsys0.a -lkernel32 -luser32 -o $base.exe" - if { $rv } { - fail "$testcase (compile)" - } else { diff --git a/winsup/utils/ldd.cc b/winsup/utils/ldd.cc index 0d073c2..a31c4c6 100644 --- a/winsup/utils/ldd.cc @@ -988,10 +914,10 @@ index c83b764..42ffbfd 100644 wcscpy (dllpath, sysdir); wcscpy (dllpath + sysdir_len, dll); diff --git a/winsup/utils/mingw/cygcheck.cc b/winsup/utils/mingw/cygcheck.cc -index 69f7592..aa87d53 100644 +index 1dde2ec..11957eb 100644 --- a/winsup/utils/mingw/cygcheck.cc +++ b/winsup/utils/mingw/cygcheck.cc -@@ -66,8 +66,7 @@ static const char *known_env_vars[] = { +@@ -95,8 +95,7 @@ static const char *known_env_vars[] = { "c_include_path", "compiler_path", "cxx_include_path", @@ -1001,7 +927,7 @@ index 69f7592..aa87d53 100644 "dejagnu", "expect", "gcc_default_options", -@@ -517,12 +516,12 @@ struct ImpDirectory +@@ -554,12 +553,12 @@ struct ImpDirectory static bool track_down (const char *file, const char *suffix, int lvl); @@ -1016,7 +942,7 @@ index 69f7592..aa87d53 100644 DWORD size = GetFileSize (h, NULL); DWORD n; -@@ -549,7 +548,7 @@ cygwin_info (HANDLE h) +@@ -586,7 +585,7 @@ cygwin_info (HANDLE h) while (buf < bufend) if ((buf = (char *) memchr (buf, '%', bufend - buf)) == NULL) break; @@ -1025,7 +951,7 @@ index 69f7592..aa87d53 100644 buf++; else { -@@ -743,7 +742,7 @@ dll_info (const char *path, HANDLE fh, int lvl, int recurse) +@@ -780,7 +779,7 @@ dll_info (const char *path, HANDLE fh, int lvl, int recurse) } } } @@ -1034,7 +960,7 @@ index 69f7592..aa87d53 100644 cygwin_info (fh); } -@@ -990,7 +989,7 @@ scan_registry (RegInfo * prev, HKEY hKey, char *name, int cygwin, bool wow64) +@@ -1027,7 +1026,7 @@ scan_registry (RegInfo * prev, HKEY hKey, char *name, int cygwin, bool wow64) char *cp; for (cp = name; *cp; cp++) @@ -1043,7 +969,7 @@ index 69f7592..aa87d53 100644 cygwin = 1; DWORD num_subkeys, max_subkey_len, num_values; -@@ -1254,7 +1253,7 @@ dump_sysinfo_services () +@@ -1291,7 +1290,7 @@ dump_sysinfo_services () /* inform the user if nothing found */ if (no_services) @@ -1052,7 +978,7 @@ index 69f7592..aa87d53 100644 } enum handle_reg_t -@@ -1269,10 +1268,10 @@ handle_reg_installation (handle_reg_t what) +@@ -1306,10 +1305,10 @@ handle_reg_installation (handle_reg_t what) HKEY key; if (what == PRINT_KEY) @@ -1065,7 +991,7 @@ index 69f7592..aa87d53 100644 what == DELETE_KEY ? KEY_READ | KEY_WRITE : KEY_READ, &key) == ERROR_SUCCESS) -@@ -1294,7 +1293,7 @@ handle_reg_installation (handle_reg_t what) +@@ -1331,7 +1330,7 @@ handle_reg_installation (handle_reg_t what) if (what == PRINT_KEY) printf (" %s Key: %s Path: %s", i ? "User: " : "System:", name, path); @@ -1074,7 +1000,7 @@ index 69f7592..aa87d53 100644 if (what == PRINT_KEY) printf ("%s\n", access (path, F_OK) ? " (ORPHANED)" : ""); else if (access (path, F_OK)) -@@ -1368,7 +1367,7 @@ dump_sysinfo () +@@ -1405,7 +1404,7 @@ dump_sysinfo () _wputenv (comspec); } @@ -1083,7 +1009,7 @@ index 69f7592..aa87d53 100644 time (&now); printf ("Current System Time: %s\n", ctime (&now)); -@@ -1638,7 +1637,7 @@ dump_sysinfo () +@@ -1733,7 +1732,7 @@ dump_sysinfo () if (givehelp) @@ -1092,7 +1018,7 @@ index 69f7592..aa87d53 100644 for (i = 0; environ[i]; i++) { char *eq = strchr (environ[i], '='); -@@ -1688,7 +1687,7 @@ dump_sysinfo () +@@ -1783,7 +1782,7 @@ dump_sysinfo () if (registry) { if (givehelp) @@ -1101,7 +1027,7 @@ index 69f7592..aa87d53 100644 scan_registry (0, HKEY_CURRENT_USER, (char *) "HKEY_CURRENT_USER", 0, false); scan_registry (0, HKEY_LOCAL_MACHINE, -@@ -1866,7 +1865,7 @@ dump_sysinfo () +@@ -1961,7 +1960,7 @@ dump_sysinfo () printf ("\n"); if (givehelp) @@ -1110,7 +1036,7 @@ index 69f7592..aa87d53 100644 int cygwin_dll_count = 0; char cygdll_path[32768]; for (pathlike *pth = paths; pth->dir; pth++) -@@ -1883,10 +1882,10 @@ dump_sysinfo () +@@ -1978,10 +1977,10 @@ dump_sysinfo () wcstombs (f, ffinfo.cFileName, sizeof f); if (strcasecmp (f + strlen (f) - 4, ".dll") == 0) { @@ -1123,7 +1049,7 @@ index 69f7592..aa87d53 100644 { if (!cygwin_dll_count) strcpy (cygdll_path, pth->dir); -@@ -1910,9 +1909,9 @@ dump_sysinfo () +@@ -2005,9 +2004,9 @@ dump_sysinfo () FindClose (ff); } if (cygwin_dll_count > 1) @@ -1135,7 +1061,7 @@ index 69f7592..aa87d53 100644 dump_dodgy_apps (verbose); -@@ -2159,8 +2158,8 @@ static char opts[] = "cdsrvkflphV"; +@@ -2993,8 +2992,8 @@ static char opts[] = "cdnsrvkfliephV"; static void print_version () { @@ -1146,7 +1072,7 @@ index 69f7592..aa87d53 100644 "Copyright (C) 1998 - %s Cygwin Authors\n" "This is free software; see the source for copying conditions. " "There is NO\n" -@@ -2192,7 +2191,7 @@ load_cygwin (int& argc, char **&argv) +@@ -3021,7 +3020,7 @@ load_cygwin (int& argc, char **&argv) { HMODULE h; @@ -1154,7 +1080,7 @@ index 69f7592..aa87d53 100644 + if (!(h = LoadLibrary ("msys-2.0.dll"))) return; GetModuleFileNameW (h, cygwin_dll_path, 32768); - if ((cygwin_internal = (uintptr_t (*) (int, ...)) + if ((cygwin_internal = (uintptr_t (*) (cygwin_getinfo_types, ...)) diff --git a/winsup/utils/mingw/strace.cc b/winsup/utils/mingw/strace.cc index c220643..a875bf2 100644 --- a/winsup/utils/mingw/strace.cc diff --git a/msys2-runtime/0004-Add-functionality-for-converting-UNIX-paths-in-argum.patch b/msys2-runtime/0004-Add-functionality-for-converting-UNIX-paths-in-argum.patch index 3c4e699437be..1577a9d2ebf6 100644 --- a/msys2-runtime/0004-Add-functionality-for-converting-UNIX-paths-in-argum.patch +++ b/msys2-runtime/0004-Add-functionality-for-converting-UNIX-paths-in-argum.patch @@ -1,4 +1,4 @@ -From eeea69a03a2d8a6fcb045bc1773d4a58a091cdc9 Mon Sep 17 00:00:00 2001 +From fc9b8337521d69a6a36a8ad3c7e37a91080846ba 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 @@ -13,19 +13,19 @@ Subject: [PATCH 04/N] Add functionality for converting UNIX paths in winsup/cygwin/include/sys/cygwin.h | 6 + winsup/cygwin/local_includes/environ.h | 2 +- winsup/cygwin/local_includes/winf.h | 4 + - winsup/cygwin/msys2_path_conv.cc | 643 +++++++++++++++++++++++++ + winsup/cygwin/msys2_path_conv.cc | 699 +++++++++++++++++++++++++ winsup/cygwin/msys2_path_conv.h | 147 ++++++ winsup/cygwin/path.cc | 69 +++ winsup/cygwin/spawn.cc | 38 +- - 10 files changed, 932 insertions(+), 4 deletions(-) + 10 files changed, 988 insertions(+), 4 deletions(-) create mode 100644 winsup/cygwin/msys2_path_conv.cc create mode 100644 winsup/cygwin/msys2_path_conv.h diff --git a/winsup/cygwin/Makefile.am b/winsup/cygwin/Makefile.am -index a57d228..70e3363 100644 +index e65e675..b1b0df7 100644 --- a/winsup/cygwin/Makefile.am +++ b/winsup/cygwin/Makefile.am -@@ -303,6 +303,7 @@ DLL_FILES= \ +@@ -312,6 +312,7 @@ DLL_FILES= \ miscfuncs.cc \ mktemp.cc \ msg.cc \ @@ -34,10 +34,10 @@ index a57d228..70e3363 100644 net.cc \ netdb.cc \ diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc -index 008854a..25be7a7 100644 +index dca5c5d..95736d0 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc -@@ -1044,7 +1044,7 @@ env_compare (const void *key, const void *memb) +@@ -1045,7 +1045,7 @@ env_compare (const void *key, const void *memb) to the child. */ char ** build_env (const char * const *envp, PWCHAR &envblock, int &envc, @@ -46,7 +46,7 @@ index 008854a..25be7a7 100644 { PWCHAR cwinenv = NULL; size_t winnum = 0; -@@ -1137,6 +1137,19 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, +@@ -1138,6 +1138,19 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, for (srcp = envp, dstp = newenv, pass_dstp = pass_env; *srcp; srcp++) { bool calc_tl = !no_envblock; @@ -66,7 +66,7 @@ index 008854a..25be7a7 100644 /* Look for entries that require special attention */ for (unsigned i = 0; i < SPENVS_SIZE; i++) if (!saw_spenv[i] && (*dstp = spenvs[i].retrieve (no_envblock, *srcp))) -@@ -1257,6 +1270,15 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, +@@ -1258,6 +1271,15 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, saw_PATH = true; } } @@ -83,7 +83,7 @@ index 008854a..25be7a7 100644 p = *srcp; /* Don't worry about it */ diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc -index 582bab8..bb1c8a1 100644 +index 97e4528..33863d8 100644 --- a/winsup/cygwin/external.cc +++ b/winsup/cygwin/external.cc @@ -141,7 +141,7 @@ create_winenv (const char * const *env) @@ -142,10 +142,10 @@ index b586934..bc53cd1 100644 for (int i = calloced; i < argc; i++) diff --git a/winsup/cygwin/msys2_path_conv.cc b/winsup/cygwin/msys2_path_conv.cc new file mode 100644 -index 0000000..2ac1517 +index 0000000..c527287 --- /dev/null +++ b/winsup/cygwin/msys2_path_conv.cc -@@ -0,0 +1,643 @@ +@@ -0,0 +1,699 @@ +/* + The MSYS2 Path conversion source code is licensed under: + @@ -489,6 +489,54 @@ index 0000000..2ac1517 + + if (*it == '\0' || it == end) return NONE; + ++ /* Let's not convert ~/.file to ~C:\msys64\.file */ ++ if (*it == '~') { ++skip_p2w: ++ *src = end; ++ return NONE; ++ } ++ ++ /* ++ * Prevent Git's :file.txt and :/message syntax from beeing modified. ++ */ ++ if (*it == ':') ++ goto skip_p2w; ++ ++ while (it != end && *it) { ++ switch (*it) { ++ case '`': ++ case '\'': ++ case '*': ++ case '?': ++ case '[': ++ case ']': ++ goto skip_p2w; ++ case '/': ++ if (it + 1 < end && it[1] == '~') ++ goto skip_p2w; ++ break; ++ case ':': ++ // Avoid mangling IPv6 addresses ++ if (it + 1 < end && it[1] == ':') ++ goto skip_p2w; ++ ++ // Leave Git's :./name syntax alone ++ if (it + 1 < end && it[1] == '.') { ++ if (it + 2 < end && it[2] == '/') ++ goto skip_p2w; ++ if (it + 3 < end && it[2] == '.' && it[3] == '/') ++ goto skip_p2w; ++ } ++ break; ++ case '@': ++ // Paths do not contain '@@' ++ if (it + 1 < end && it[1] == '@') ++ goto skip_p2w; ++ } ++ ++it; ++ } ++ it = *src; ++ + while (!isalnum(*it) && *it != '/' && *it != '\\' && *it != ':' && *it != '-' && *it != '.') { + recurse = true; + it = ++*src; @@ -561,6 +609,8 @@ index 0000000..2ac1517 + + int starts_with_minus = 0; + int starts_with_minus_alpha = 0; ++ int only_dots = *it == '.'; ++ int has_slashes = 0; + if (*it == '-') { + starts_with_minus = 1; + it += 1; @@ -604,11 +654,17 @@ index 0000000..2ac1517 + if (ch == '/' && *(it2 + 1) == '/') { + return URL; + } else { ++ if (!only_dots && !has_slashes) ++ goto skip_p2w; + return POSIX_PATH_LIST; + } + } else if (memchr(it2, '=', end - it2) == NULL) { + return SIMPLE_WINDOWS_PATH; + } ++ } else if (ch != '.') { ++ only_dots = 0; ++ if (ch == '/' || ch == '\\') ++ has_slashes = 1; + } + } + @@ -943,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 5ad9e20..c211395 100644 +index b8e5746..2615aa7 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -66,6 +66,7 @@ @@ -954,7 +1010,7 @@ index 5ad9e20..c211395 100644 #undef basename suffix_info stat_suffixes[] = -@@ -3838,6 +3839,74 @@ fchdir (int fd) +@@ -3863,6 +3864,74 @@ fchdir (int fd) return res; } @@ -1030,10 +1086,10 @@ index 5ad9e20..c211395 100644 /* Cover functions to the path conversion routines. diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc -index 5ac9080..f7af9f7 100644 +index dc1c4ac..f73339d 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc -@@ -281,6 +281,27 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, +@@ -292,6 +292,27 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, bool rc; int res = -1; @@ -1061,7 +1117,7 @@ index 5ac9080..f7af9f7 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); -@@ -372,6 +393,20 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, +@@ -383,6 +404,20 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, moreinfo->argc = newargv.argc; moreinfo->argv = newargv; } @@ -1082,7 +1138,7 @@ index 5ac9080..f7af9f7 100644 if ((wincmdln || !real_path.iscygexec ()) && !cmd.fromargv (newargv, real_path.get_win32 (), real_path.iscygexec ())) -@@ -502,7 +537,8 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, +@@ -513,7 +548,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 () diff --git a/msys2-runtime/0005-Add-functionality-for-changing-OS-name-via-MSYSTEM-e.patch b/msys2-runtime/0005-Add-functionality-for-changing-OS-name-via-MSYSTEM-e.patch index beb42ad1c93e..d5d5dbce8cef 100644 --- a/msys2-runtime/0005-Add-functionality-for-changing-OS-name-via-MSYSTEM-e.patch +++ b/msys2-runtime/0005-Add-functionality-for-changing-OS-name-via-MSYSTEM-e.patch @@ -1,4 +1,4 @@ -From ba290ba7180fa545ed76df92c7ada1d4bae77d67 Mon Sep 17 00:00:00 2001 +From a5a0cba0c5e0cc8d0b98121b4cd922bfa2f5d642 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 @@ -35,7 +35,7 @@ index 373bfd2..c902857 100755 echo echo "Installation of cygserver as service failed. Please check the" diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc -index 25be7a7..568bb34 100644 +index 95736d0..1f661b3 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -191,7 +191,11 @@ parse_options (const char *inbuf) @@ -93,8 +93,8 @@ index 25be7a7..568bb34 100644 /* Turn environment variable part of a=b string into uppercase - for some environment variables only. */ -@@ -834,7 +852,11 @@ environ_init (char **envp, int envc) - environ = envp; +@@ -835,7 +853,11 @@ environ_init (char **envp, int envc) + dumper_init (); if (envp_passed_in) { +#ifdef __MSYS__ @@ -105,7 +105,7 @@ index 25be7a7..568bb34 100644 if (p) parse_options (p); } -@@ -881,8 +903,13 @@ win32env_to_cygenv (PWCHAR rawenv, bool posify) +@@ -882,8 +904,13 @@ win32env_to_cygenv (PWCHAR rawenv, bool posify) ucenv (newp, eq); /* uppercase env vars which need it */ if (*newp == 'T' && strncmp (newp, "TERM=", 5) == 0) sawTERM = 1; @@ -119,7 +119,7 @@ index 25be7a7..568bb34 100644 if (*eq && posify) posify_maybe (envp + i, *++eq ? eq : --eq, tmpbuf); debug_printf ("%p: %s", envp[i], envp[i]); -@@ -951,12 +978,13 @@ struct spenv +@@ -952,12 +979,13 @@ struct spenv static NO_COPY spenv spenvs[] = { #ifdef DEBUGGING diff --git a/msys2-runtime/0006-Move-root-to-usr.-Change-sorting-mount-points.-By-de.patch b/msys2-runtime/0006-Move-root-to-usr.-Change-sorting-mount-points.-By-de.patch index 25f87c912e07..b9f85de315e0 100644 --- a/msys2-runtime/0006-Move-root-to-usr.-Change-sorting-mount-points.-By-de.patch +++ b/msys2-runtime/0006-Move-root-to-usr.-Change-sorting-mount-points.-By-de.patch @@ -1,4 +1,4 @@ -From f814d1890b61e83b7d51780d0fe2eb09875d6f0d Mon Sep 17 00:00:00 2001 +From bc1a633037411ade2c354b42d48c7f0f0ade00d8 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 @@ -14,10 +14,10 @@ Subject: [PATCH 06/N] - Move root to /usr. - Change sorting mount points. - 4 files changed, 174 insertions(+), 28 deletions(-) diff --git a/winsup/cygwin/local_includes/mount.h b/winsup/cygwin/local_includes/mount.h -index 5bb84b9..cb48a68 100644 +index b2acdf0..1fc5c39 100644 --- a/winsup/cygwin/local_includes/mount.h +++ b/winsup/cygwin/local_includes/mount.h -@@ -170,7 +170,6 @@ class mount_info +@@ -172,7 +172,6 @@ class mount_info mount_item mount[MAX_MOUNTS]; static bool got_usr_bin; @@ -25,7 +25,7 @@ index 5bb84b9..cb48a68 100644 static int root_idx; /* cygdrive_prefix is used as the root of the path automatically -@@ -182,6 +181,8 @@ class mount_info +@@ -184,6 +183,8 @@ class mount_info private: int posix_sorted[MAX_MOUNTS]; int native_sorted[MAX_MOUNTS]; @@ -35,10 +35,10 @@ index 5bb84b9..cb48a68 100644 public: void init (bool); diff --git a/winsup/cygwin/mm/cygheap.cc b/winsup/cygwin/mm/cygheap.cc -index 4fda29d..b1d5acb 100644 +index 3dc0c01..bf4d82f 100644 --- a/winsup/cygwin/mm/cygheap.cc +++ b/winsup/cygwin/mm/cygheap.cc -@@ -218,14 +218,22 @@ init_cygheap::init_installation_root () +@@ -220,14 +220,22 @@ init_cygheap::init_installation_root () /* Strip off last path component ("\\cygwin1.dll") */ PWCHAR w = wcsrchr (installation_root_buf, L'\\'); @@ -62,7 +62,7 @@ index 4fda29d..b1d5acb 100644 /* Copy result into installation_dir before stripping off "bin" dir and revert to Win32 path. This path is added to the Windows environment -@@ -250,6 +258,7 @@ init_cygheap::init_installation_root () +@@ -252,6 +260,7 @@ init_cygheap::init_installation_root () RtlInitUnicodeString (&installation_root, installation_root_buf); RtlInitUnicodeString (&installation_dir, installation_dir_buf); @@ -70,7 +70,7 @@ index 4fda29d..b1d5acb 100644 for (int i = 1; i >= 0; --i) { reg_key r (i, KEY_WRITE, _WIDE (CYGWIN_INFO_INSTALLATIONS_NAME), -@@ -258,6 +267,7 @@ init_cygheap::init_installation_root () +@@ -260,6 +269,7 @@ init_cygheap::init_installation_root () installation_root_buf))) break; } @@ -79,10 +79,10 @@ index 4fda29d..b1d5acb 100644 /* Initialize bucket_val. The value is the max size of a block diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc -index 14c1ac7..939578a 100644 +index bf26c4a..eff9803 100644 --- a/winsup/cygwin/mount.cc +++ b/winsup/cygwin/mount.cc -@@ -39,7 +39,6 @@ details. */ +@@ -42,7 +42,6 @@ details. */ (path_prefix_p (proc, (path), proc_len, false)) bool NO_COPY mount_info::got_usr_bin; @@ -90,7 +90,7 @@ index 14c1ac7..939578a 100644 int NO_COPY mount_info::root_idx = -1; /* is_native_path: Return non-zero if PATH starts with \??\[a-zA-Z] or -@@ -354,7 +353,6 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol) +@@ -395,7 +394,6 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol) #define MINIMAL_WIN_NTFS_FLAGS (FILE_CASE_SENSITIVE_SEARCH \ | FILE_CASE_PRESERVED_NAMES \ | FILE_UNICODE_ON_DISK \ @@ -98,7 +98,7 @@ index 14c1ac7..939578a 100644 | FILE_FILE_COMPRESSION \ | FILE_VOLUME_QUOTAS \ | FILE_SUPPORTS_SPARSE_FILES \ -@@ -495,13 +493,13 @@ mount_info::create_root_entry (const PWCHAR root) +@@ -552,13 +550,13 @@ mount_info::create_root_entry (const PWCHAR root) sys_wcstombs (native_root, PATH_MAX, root); assert (*native_root != '\0'); if (add_item (native_root, "/", @@ -114,7 +114,7 @@ index 14c1ac7..939578a 100644 strcpy (cygdrive, CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX "/"); cygdrive_len = strlen (cygdrive); } -@@ -521,22 +519,14 @@ mount_info::init (bool user_init) +@@ -578,22 +576,14 @@ mount_info::init (bool user_init) pathend = wcpcpy (pathend, L"\\etc\\fstab"); from_fstab (user_init, path, pathend); @@ -141,7 +141,7 @@ index 14c1ac7..939578a 100644 } } -@@ -617,6 +607,7 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, +@@ -674,6 +664,7 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, /* See if this is a cygwin "device" */ if (win32_device_name (src_path, dst, dev)) { @@ -149,7 +149,7 @@ index 14c1ac7..939578a 100644 *flags = 0; rc = 0; goto out_no_chroot_check; -@@ -647,6 +638,7 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, +@@ -711,6 +702,7 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, } if (isproc (src_path)) { @@ -157,7 +157,7 @@ index 14c1ac7..939578a 100644 dev = *proc_dev; dev = fhandler_proc::get_proc_fhandler (src_path); if (dev == FH_NADA) -@@ -668,6 +660,7 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, +@@ -732,6 +724,7 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, off the prefix and transform it into an MS-DOS path. */ else if (iscygdrive (src_path)) { @@ -165,7 +165,7 @@ index 14c1ac7..939578a 100644 int n = mount_table->cygdrive_len - 1; int unit; -@@ -679,11 +672,15 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, +@@ -743,11 +736,15 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, } else if (cygdrive_win32_path (src_path, dst, unit)) { @@ -182,7 +182,7 @@ index 14c1ac7..939578a 100644 } int chroot_pathlen; -@@ -694,7 +691,9 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, +@@ -758,7 +755,9 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev, const char *path; int len; @@ -193,7 +193,7 @@ index 14c1ac7..939578a 100644 if (!cygheap->root.exists () || (mi->posix_pathlen == 1 && mi->posix_path[0] == '/')) { -@@ -934,7 +933,8 @@ mount_info::conv_to_posix_path (const char *src_path, char *posix_path, +@@ -998,7 +997,8 @@ mount_info::conv_to_posix_path (const char *src_path, char *posix_path, int pathbuflen = tail - pathbuf; for (int i = 0; i < nmounts; ++i) { @@ -203,7 +203,7 @@ index 14c1ac7..939578a 100644 if (!path_prefix_p (mi.native_path, pathbuf, mi.native_pathlen, mi.flags & MOUNT_NOPOSIX)) continue; -@@ -1147,8 +1147,17 @@ mount_info::from_fstab_line (char *line, bool user) +@@ -1211,8 +1211,17 @@ mount_info::from_fstab_line (char *line, bool user) if (!*c) return true; cend = find_ws (c); @@ -222,7 +222,7 @@ index 14c1ac7..939578a 100644 /* Third field: FS type. */ c = skip_ws (cend + 1); if (!*c) -@@ -1377,16 +1386,145 @@ sort_by_native_name (const void *a, const void *b) +@@ -1441,16 +1450,145 @@ sort_by_native_name (const void *a, const void *b) return res; } @@ -369,7 +369,7 @@ index 14c1ac7..939578a 100644 } /* Add an entry to the mount table. -@@ -1477,12 +1615,9 @@ mount_info::add_item (const char *native, const char *posix, +@@ -1541,12 +1679,9 @@ mount_info::add_item (const char *native, const char *posix, if (i == nmounts) nmounts++; @@ -384,10 +384,10 @@ index 14c1ac7..939578a 100644 root_idx = i; diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc -index 6df8c7b..9bbcf1c 100644 +index 21d729d..61826fc 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc -@@ -2678,7 +2678,7 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t &arg, cyg_ldap *pldap) +@@ -2816,7 +2816,7 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t &arg, cyg_ldap *pldap) dom, name, sid.string ((char *) sidstr), home ?: "/home/", home ? L"" : name, diff --git a/msys2-runtime/0007-Instead-of-creating-Cygwin-symlinks-use-deep-copy-by.patch b/msys2-runtime/0007-Instead-of-creating-Cygwin-symlinks-use-deep-copy-by.patch index 3c1d7e74d71d..75880e0b196a 100644 --- a/msys2-runtime/0007-Instead-of-creating-Cygwin-symlinks-use-deep-copy-by.patch +++ b/msys2-runtime/0007-Instead-of-creating-Cygwin-symlinks-use-deep-copy-by.patch @@ -1,4 +1,4 @@ -From e482cfa56a41a66f1a13fea5221dcaa52eaa8765 Mon Sep 17 00:00:00 2001 +From 791aadb5669582f892f12a8d2f65be27c7661b60 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 @@ -25,7 +25,7 @@ Co-authored-by: Johannes Schindelin 3 files changed, 160 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc -index 568bb34..02b47ad 100644 +index 1f661b3..ee43375 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -88,6 +88,10 @@ set_winsymlinks (const char *buf) @@ -40,7 +40,7 @@ index 568bb34..02b47ad 100644 /* The structure below is used to set up an array which is used to diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc -index aef4a68..cd907b7 100644 +index a94aa56..ffea53a 100644 --- a/winsup/cygwin/globals.cc +++ b/winsup/cygwin/globals.cc @@ -57,6 +57,7 @@ enum winsym_t @@ -59,9 +59,9 @@ index aef4a68..cd907b7 100644 +winsym_t allow_winsymlinks = WSYM_deepcopy; bool disable_pcon; - bool NO_COPY in_forkee; + /* Taken from BSD libc: diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc -index c211395..4a6157d 100644 +index 2615aa7..bc5b4d3 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, diff --git a/msys2-runtime/0008-Automatically-rewrite-TERM-msys-to-TERM-cygwin.patch b/msys2-runtime/0008-Automatically-rewrite-TERM-msys-to-TERM-cygwin.patch index b1d81c7215fd..a147ba826a3b 100644 --- a/msys2-runtime/0008-Automatically-rewrite-TERM-msys-to-TERM-cygwin.patch +++ b/msys2-runtime/0008-Automatically-rewrite-TERM-msys-to-TERM-cygwin.patch @@ -1,4 +1,4 @@ -From 21dce32652b4f05908405fdd938af6c0734af91d Mon Sep 17 00:00:00 2001 +From 6424ec5520e1aff2ef2c3d58c3b1be0dd9b8ae22 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 @@ -13,10 +13,10 @@ use our preferred TERM value. 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc -index 02b47ad..7a4a6ea 100644 +index ee43375..ebd5d61 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc -@@ -906,7 +906,16 @@ win32env_to_cygenv (PWCHAR rawenv, bool posify) +@@ -907,7 +907,16 @@ win32env_to_cygenv (PWCHAR rawenv, bool posify) char *eq = strchrnul (newp, '='); ucenv (newp, eq); /* uppercase env vars which need it */ if (*newp == 'T' && strncmp (newp, "TERM=", 5) == 0) diff --git a/msys2-runtime/0009-Do-not-convert-environment-for-strace.patch b/msys2-runtime/0009-Do-not-convert-environment-for-strace.patch index df564e7be43b..92f14a299a0e 100644 --- a/msys2-runtime/0009-Do-not-convert-environment-for-strace.patch +++ b/msys2-runtime/0009-Do-not-convert-environment-for-strace.patch @@ -1,4 +1,4 @@ -From a0d3abb609a335fc657ca3e626b57c6395d50d50 Mon Sep 17 00:00:00 2001 +From dd68e838b3e9b3020b125f71a8fa8c22d130da74 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,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 f7af9f7..73e6a00 100644 +index f73339d..381a313 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc -@@ -534,11 +534,13 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, +@@ -545,11 +545,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); diff --git a/msys2-runtime/0010-path_conv-special-case-root-directory-to-have-traili.patch b/msys2-runtime/0010-path_conv-special-case-root-directory-to-have-traili.patch index b86e29ce0cf8..044917253ef1 100644 --- a/msys2-runtime/0010-path_conv-special-case-root-directory-to-have-traili.patch +++ b/msys2-runtime/0010-path_conv-special-case-root-directory-to-have-traili.patch @@ -1,4 +1,4 @@ -From 6055cf10fa66f74732ec91b4e07e2f8415f2a412 Mon Sep 17 00:00:00 2001 +From df746f8ca344e6ff136d0cf40a4763dfb27646e2 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 4a6157d..a84706e 100644 +index bc5b4d3..ed3076c 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -709,6 +709,12 @@ path_conv::check (const char *src, unsigned opt, diff --git a/msys2-runtime/0011-dcrt0.cc-Untangle-allow_glob-from-winshell.patch b/msys2-runtime/0011-dcrt0.cc-Untangle-allow_glob-from-winshell.patch index 793a83ee7603..6becabbe913f 100644 --- a/msys2-runtime/0011-dcrt0.cc-Untangle-allow_glob-from-winshell.patch +++ b/msys2-runtime/0011-dcrt0.cc-Untangle-allow_glob-from-winshell.patch @@ -1,4 +1,4 @@ -From 8dd6203320a8c33624c7d2e3f0d1d63c6dae3e45 Mon Sep 17 00:00:00 2001 +From 27a7ee531ff3333d1282628c32eb5c7db898e787 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Fri, 21 Aug 2015 12:52:09 +0100 Subject: [PATCH 11/N] dcrt0.cc: Untangle allow_glob from winshell @@ -11,7 +11,7 @@ a Cygwin program. 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc -index b40697a..2e6d00a 100644 +index 5644cc9..bd206b4 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -154,12 +154,12 @@ isquote (char c) diff --git a/msys2-runtime/0012-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch b/msys2-runtime/0012-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch index 225bdd69a759..724106dfaac0 100644 --- a/msys2-runtime/0012-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch +++ b/msys2-runtime/0012-dcrt0.cc-globify-Don-t-quote-literal-strings-differe.patch @@ -1,4 +1,4 @@ -From e9b519af4a971d8d804b05906ef8ab1831bb1f05 Mon Sep 17 00:00:00 2001 +From f7208503f2b4bd2bc59e616bf26dd4aac80a5d4d Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Mon, 24 Aug 2015 00:48:06 +0100 Subject: [PATCH 12/N] dcrt0.cc (globify): Don't quote literal strings @@ -30,7 +30,7 @@ the expense of sensible forward-slash-containing input. 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc -index 2e6d00a..3c977d0 100644 +index bd206b4..3bddce5 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -236,10 +236,20 @@ globify (char *word, char **&argv, int &argc, int &argvlen) diff --git a/msys2-runtime/0013-strace.cc-Don-t-set-MSYS-noglob.patch b/msys2-runtime/0013-strace.cc-Don-t-set-MSYS-noglob.patch index d3ac37e69854..81e5899fb3a0 100644 --- a/msys2-runtime/0013-strace.cc-Don-t-set-MSYS-noglob.patch +++ b/msys2-runtime/0013-strace.cc-Don-t-set-MSYS-noglob.patch @@ -1,4 +1,4 @@ -From e1510e606a89af0890bb6bae8a944eea3d42857c Mon Sep 17 00:00:00 2001 +From cc7f4c397cffcdf92eab91a539b385e98775115d Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sun, 23 Aug 2015 20:47:30 +0100 Subject: [PATCH 13/N] strace.cc: Don't set MSYS=noglob diff --git a/msys2-runtime/0014-Add-debugging-for-build_argv.patch b/msys2-runtime/0014-Add-debugging-for-build_argv.patch index d9331e2063ea..8b67d5897a9e 100644 --- a/msys2-runtime/0014-Add-debugging-for-build_argv.patch +++ b/msys2-runtime/0014-Add-debugging-for-build_argv.patch @@ -1,4 +1,4 @@ -From b8ef94d438bd0ffe9693e799e1790b88765f7f23 Mon Sep 17 00:00:00 2001 +From 6d24e9e21524350ae1d55a21029131dd75fd0b4b Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Fri, 21 Aug 2015 12:18:52 +0100 Subject: [PATCH 14/N] Add debugging for build_argv @@ -8,7 +8,7 @@ Subject: [PATCH 14/N] Add debugging for build_argv 1 file changed, 2 insertions(+) diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc -index 3c977d0..d7a1b1a 100644 +index 3bddce5..7b80211 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -310,6 +310,8 @@ build_argv (char *cmd, char **&argv, int &argc, int winshell, int glob) diff --git a/msys2-runtime/0015-Add-debugging-for-strace-make_command_line.patch b/msys2-runtime/0015-Add-debugging-for-strace-make_command_line.patch index 56fc846fc6ad..43bbbaaa3e9c 100644 --- a/msys2-runtime/0015-Add-debugging-for-strace-make_command_line.patch +++ b/msys2-runtime/0015-Add-debugging-for-strace-make_command_line.patch @@ -1,4 +1,4 @@ -From cebcd4929ecdf1151aabb0bce43bdfbd7c7364a6 Mon Sep 17 00:00:00 2001 +From d8cb51c8106ce6783a3a47e2e838e62f6a5c2563 Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Fri, 21 Aug 2015 09:52:47 +0100 Subject: [PATCH 15/N] Add debugging for strace make_command_line diff --git a/msys2-runtime/0016-environ.cc-New-facility-environment-variable-MSYS2_E.patch b/msys2-runtime/0016-environ.cc-New-facility-environment-variable-MSYS2_E.patch index a54f9dcc11b2..18e3da5ca820 100644 --- a/msys2-runtime/0016-environ.cc-New-facility-environment-variable-MSYS2_E.patch +++ b/msys2-runtime/0016-environ.cc-New-facility-environment-variable-MSYS2_E.patch @@ -1,4 +1,4 @@ -From 55ffb73568b73d9b3fd5057ef16858fce500ad0e Mon Sep 17 00:00:00 2001 +From 79cd04c3ce45f15ca5a1290968926f405d467e2c Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sun, 10 Apr 2016 21:47:41 +0100 Subject: [PATCH 16/N] environ.cc: New facility/environment variable @@ -25,10 +25,10 @@ it to another absolute path, R_HOME, forming an invalid path. 5 files changed, 48 insertions(+), 21 deletions(-) diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc -index 7a4a6ea..4a15069 100644 +index ebd5d61..b0df6ef 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc -@@ -1171,6 +1171,10 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, +@@ -1172,6 +1172,10 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, int tl = 0; char **pass_dstp; @@ -39,7 +39,7 @@ index 7a4a6ea..4a15069 100644 char **pass_env = (char **) alloca (sizeof (char *) * (n + winnum + SPENVS_SIZE + 1)); /* Iterate over input list, generating a new environment list and refreshing -@@ -1179,16 +1183,25 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, +@@ -1180,16 +1184,25 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, { bool calc_tl = !no_envblock; #ifdef __MSYS__ @@ -74,7 +74,7 @@ index 7a4a6ea..4a15069 100644 } #endif /* Look for entries that require special attention */ -@@ -1313,7 +1326,8 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, +@@ -1314,7 +1327,8 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, } #ifdef __MSYS__ else if (!keep_posix) { @@ -129,10 +129,10 @@ index 767384f..160c996 100644 (See "How to: Set a Thread Name in Native Code" diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc -index a84706e..7500854 100644 +index ed3076c..7802c20 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc -@@ -4019,7 +4019,6 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions, +@@ -4044,7 +4044,6 @@ arg_heuristic_with_exclusions (char const * const arg, char const * exclusions, return arg_result; } @@ -141,10 +141,10 @@ index a84706e..7500854 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 73e6a00..99dbe64 100644 +index 381a313..3c79d7a 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc -@@ -282,8 +282,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, +@@ -293,8 +293,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, int res = -1; /* Environment variable MSYS2_ARG_CONV_EXCL contains a list @@ -154,7 +154,7 @@ index 73e6a00..99dbe64 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; -@@ -292,14 +291,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, +@@ -303,14 +302,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); diff --git a/msys2-runtime/0017-Fix-native-symbolic-link-spawn-passing-wrong-arg0.patch b/msys2-runtime/0017-Fix-native-symbolic-link-spawn-passing-wrong-arg0.patch index eeb183cf6fff..8ba3ce32ab71 100644 --- a/msys2-runtime/0017-Fix-native-symbolic-link-spawn-passing-wrong-arg0.patch +++ b/msys2-runtime/0017-Fix-native-symbolic-link-spawn-passing-wrong-arg0.patch @@ -1,4 +1,4 @@ -From 3ed78c6fea6757ed9ce08328d7d3a16dc3570222 Mon Sep 17 00:00:00 2001 +From d1d1fb1f384b3c701bb233666d18fe7a6335b40a Mon Sep 17 00:00:00 2001 From: SquallATF 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 99dbe64..c77970b 100644 +index 3c79d7a..8b11b9d 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) diff --git a/msys2-runtime/0018-strace-quiet-be-really-quiet.patch b/msys2-runtime/0018-strace-quiet-be-really-quiet.patch index 072ffd4913cf..9d96764118b9 100644 --- a/msys2-runtime/0018-strace-quiet-be-really-quiet.patch +++ b/msys2-runtime/0018-strace-quiet-be-really-quiet.patch @@ -1,4 +1,4 @@ -From 135fa9942180eb50a404ddb59b7131b827550b39 Mon Sep 17 00:00:00 2001 +From 1add8e74f7f908031e08033fc0beac0a2f4f0019 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 17 May 2017 18:13:32 +0200 Subject: [PATCH 18/N] strace --quiet: be *really* quiet diff --git a/msys2-runtime/0019-Introduce-the-enable_pcon-value-for-MSYS.patch b/msys2-runtime/0019-Introduce-the-enable_pcon-value-for-MSYS.patch index 4874c1466e91..4b50e1a25ec2 100644 --- a/msys2-runtime/0019-Introduce-the-enable_pcon-value-for-MSYS.patch +++ b/msys2-runtime/0019-Introduce-the-enable_pcon-value-for-MSYS.patch @@ -1,4 +1,4 @@ -From b9373c6e2343625d65d3f4fcea7e3880a845b9c2 Mon Sep 17 00:00:00 2001 +From b6148175738ce76d1c8cfa2c61c05e75eb015c4b Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 19 May 2020 13:49:37 +0200 Subject: [PATCH 19/N] Introduce the `enable_pcon` value for `MSYS` @@ -19,7 +19,7 @@ Signed-off-by: Johannes Schindelin 1 file changed, 9 insertions(+) diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc -index 4a15069..89e989a 100644 +index b0df6ef..bbd843f 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -42,6 +42,7 @@ enum settings diff --git a/msys2-runtime/0020-popen-call-usr-bin-sh-instead-of-bin-sh.patch b/msys2-runtime/0020-popen-call-usr-bin-sh-instead-of-bin-sh.patch index 83c0e1268e61..409e1c1a82eb 100644 --- a/msys2-runtime/0020-popen-call-usr-bin-sh-instead-of-bin-sh.patch +++ b/msys2-runtime/0020-popen-call-usr-bin-sh-instead-of-bin-sh.patch @@ -1,4 +1,4 @@ -From 67be933931bfa9ebd02c429cef4d8e1847c016e0 Mon Sep 17 00:00:00 2001 +From ddbc71a8a3ca6d93aa7b0e49536d9f42cd64a67f Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 5 Jun 2020 20:09:11 +0200 Subject: [PATCH 20/N] popen: call /usr/bin/sh instead of /bin/sh @@ -17,10 +17,10 @@ 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 91b86bf..725def4 100644 +index ed564c8..fe4b9cb 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc -@@ -4342,7 +4342,7 @@ popen (const char *command, const char *in_type) +@@ -4423,7 +4423,7 @@ popen (const char *command, const char *in_type) fcntl (stdchild, F_SETFD, stdchild_state | FD_CLOEXEC); /* Start a shell process to run the given command without forking. */ diff --git a/msys2-runtime/0021-Expose-full-command-lines-to-other-Win32-processes-b.patch b/msys2-runtime/0021-Expose-full-command-lines-to-other-Win32-processes-b.patch index b26649a9a417..0db60cfac961 100644 --- a/msys2-runtime/0021-Expose-full-command-lines-to-other-Win32-processes-b.patch +++ b/msys2-runtime/0021-Expose-full-command-lines-to-other-Win32-processes-b.patch @@ -1,4 +1,4 @@ -From a609f04755bbbf9b18a5f812d234c467cf351c2f Mon Sep 17 00:00:00 2001 +From 38573b506e77cf65974204d4c64bf010c1cf07d4 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 12 Aug 2020 12:22:38 +0200 Subject: [PATCH 21/N] Expose full command-lines to other Win32 processes by @@ -26,7 +26,7 @@ Signed-off-by: Johannes Schindelin 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc -index cd907b7..1541fa4 100644 +index ffea53a..712792e 100644 --- a/winsup/cygwin/globals.cc +++ b/winsup/cygwin/globals.cc @@ -70,7 +70,7 @@ bool allow_glob = true; @@ -39,10 +39,10 @@ index cd907b7..1541fa4 100644 bool disable_pcon; diff --git a/winsup/doc/cygwinenv.xml b/winsup/doc/cygwinenv.xml -index 5e17404..3051416 100644 +index 05672c4..8611ae7 100644 --- a/winsup/doc/cygwinenv.xml +++ b/winsup/doc/cygwinenv.xml -@@ -73,7 +73,7 @@ time and when handles are inherited. Defaults to set. +@@ -90,7 +90,7 @@ time and when handles are inherited. Defaults to set. (no)wincmdln - if set, the windows complete command line (truncated to ~32K) will be passed on any processes that it creates diff --git a/msys2-runtime/0022-Do-not-show-Error-dialogs-by-default.patch b/msys2-runtime/0022-Do-not-show-Error-dialogs-by-default.patch index 5b2717493d39..75cf0537a3b5 100644 --- a/msys2-runtime/0022-Do-not-show-Error-dialogs-by-default.patch +++ b/msys2-runtime/0022-Do-not-show-Error-dialogs-by-default.patch @@ -1,4 +1,4 @@ -From 7616b8a2e0ffcf068b47e1a66bbb1dbd7d9b5c50 Mon Sep 17 00:00:00 2001 +From 5d63aaac8b6fdb16d12a8496589c16987a996f68 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 31 Mar 2021 11:38:41 +0200 Subject: [PATCH 22/N] Do not show Error dialogs by default @@ -27,7 +27,7 @@ Signed-off-by: Johannes Schindelin 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc -index 89e989a..31ada02 100644 +index bbd843f..1e82b9f 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -128,6 +128,7 @@ static struct parse_thing @@ -39,7 +39,7 @@ index 89e989a..31ada02 100644 }; diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc -index 1541fa4..f243aad 100644 +index 712792e..b3b77de 100644 --- a/winsup/cygwin/globals.cc +++ b/winsup/cygwin/globals.cc @@ -73,6 +73,7 @@ bool reset_com; @@ -48,13 +48,13 @@ index 1541fa4..f243aad 100644 bool disable_pcon; +bool winjitdebug = false; - bool NO_COPY in_forkee; - + /* Taken from BSD libc: + This variable is zero until a process has created a pthread. It is used diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc -index c77970b..383f5e5 100644 +index 8b11b9d..ce1999d 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc -@@ -429,7 +429,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, +@@ -440,7 +440,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. */ 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 1c91785283c3..73d3c5db2b7b 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 d0d21acc471b3832648bbf6ad4b69dd46802f383 Mon Sep 17 00:00:00 2001 +From cbde0ba17508e82f591860bc4b1aca20a81648e1 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 @@ -23,7 +23,7 @@ Signed-off-by: Johannes Schindelin create mode 100644 winsup/utils/mingw/getprocaddr.c diff --git a/winsup/configure.ac b/winsup/configure.ac -index 132028d..bc5c774 100644 +index 9b9b59d..b9e3977 100644 --- a/winsup/configure.ac +++ b/winsup/configure.ac @@ -106,6 +106,11 @@ if test "x$with_cross_bootstrap" != "xyes"; then @@ -39,7 +39,7 @@ index 132028d..bc5c774 100644 AM_CONDITIONAL(CROSS_BOOTSTRAP, [test "x$with_cross_bootstrap" != "xyes"]) diff --git a/winsup/utils/mingw/Makefile.am b/winsup/utils/mingw/Makefile.am -index c26eef8..d66c226 100644 +index d9557d8..b89d894 100644 --- a/winsup/utils/mingw/Makefile.am +++ b/winsup/utils/mingw/Makefile.am @@ -26,6 +26,21 @@ bin_PROGRAMS = \ diff --git a/msys2-runtime/0024-Emulate-GenerateConsoleCtrlEvent-upon-Ctrl-C.patch b/msys2-runtime/0024-Emulate-GenerateConsoleCtrlEvent-upon-Ctrl-C.patch index 4f71e7d95768..929bc3a97312 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 7b32587cf789bf5e5a442153f872393825a6efb6 Mon Sep 17 00:00:00 2001 +From 3671a984cd4ae3393bb0a9b64fbc5914f47f9c4d 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 @@ -93,7 +93,7 @@ Signed-off-by: Johannes Schindelin create mode 100644 winsup/cygwin/include/cygwin/exit_process.h diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc -index b154a3b..b843063 100644 +index b369799..36feb45 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -29,6 +29,7 @@ details. */ @@ -104,7 +104,7 @@ index b154a3b..b843063 100644 /* Define macros for CPU-agnostic register access. The _CX_foo macros are for access into CONTEXT, the _MC_foo ones for access into -@@ -1511,10 +1512,25 @@ exit_sig: +@@ -1598,10 +1599,25 @@ exit_sig: dosig: if (have_execed) { 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 a7103a2c315a..3b332c6c40d6 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 14a7518bdaad3d64a35f61dae33f8e8178d123c7 Mon Sep 17 00:00:00 2001 +From 04ba8677be0379640b8ae8f63a4770a3a812c0c2 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 @@ -13,7 +13,7 @@ Signed-off-by: Johannes Schindelin 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/winsup/utils/kill.cc b/winsup/utils/kill.cc -index fc984c0..05ecd13 100644 +index fb45e4c..28473d1 100644 --- a/winsup/utils/kill.cc +++ b/winsup/utils/kill.cc @@ -17,6 +17,7 @@ details. */ @@ -24,7 +24,7 @@ index fc984c0..05ecd13 100644 static char *prog_name; -@@ -188,10 +189,20 @@ forcekill (pid_t pid, DWORD winpid, int sig, int wait) +@@ -300,10 +301,20 @@ forcekill (pid_t pid, DWORD winpid, int sig, int wait) return; } if (!wait || WaitForSingleObject (h, 200) != WAIT_OBJECT_0) 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 ff6425a0a75c..05cac96755af 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 11ef688a7233763d93046bfb39c4a3d9d36b1038 Mon Sep 17 00:00:00 2001 +From 151bb0bd86491414fd86d4f1fa99949084adad69 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. @@ -13,7 +13,7 @@ needed. MSYS=nonativeinnerlinks 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc -index 31ada02..b285a7c 100644 +index 1e82b9f..31c5983 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -129,6 +129,7 @@ static struct parse_thing @@ -25,7 +25,7 @@ index 31ada02..b285a7c 100644 }; diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc -index f243aad..bb37ca2 100644 +index b3b77de..ab2c205 100644 --- a/winsup/cygwin/globals.cc +++ b/winsup/cygwin/globals.cc @@ -74,6 +74,7 @@ bool wincmdln = true; @@ -34,13 +34,13 @@ index f243aad..bb37ca2 100644 bool winjitdebug = false; +bool nativeinnerlinks = true; - bool NO_COPY in_forkee; - + /* 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 7500854..af88ecf 100644 +index 7802c20..96ef871 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc -@@ -3690,7 +3690,8 @@ restart: +@@ -3715,7 +3715,8 @@ 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 a5392d6f8067..8571cf7258b8 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 2d4c3172e6aa1f9d77528f8906bd6b18637e4993 Mon Sep 17 00:00:00 2001 +From 680d9d7c7d6b188b36c2a4b4ef7191cc4a7cba50 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 @@ -12,7 +12,7 @@ Signed-off-by: Johannes Schindelin 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/winsup/configure.ac b/winsup/configure.ac -index bc5c774..e55e19a 100644 +index b9e3977..b88f3ad 100644 --- a/winsup/configure.ac +++ b/winsup/configure.ac @@ -84,11 +84,10 @@ AM_CONDITIONAL(BUILD_DOC, [test $enable_doc != "no"]) 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 6a92dbd03bf7..7b78bc8f5e20 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 355fc4566a62ec15f565737dac3e98bf5c1190a6 Mon Sep 17 00:00:00 2001 +From 745587f347413b80dbeaeae3030616a940760132 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" @@ -14,10 +14,10 @@ Signed-off-by: Johannes Schindelin 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/Makefile.am b/winsup/cygwin/Makefile.am -index 70e3363..673bb7b 100644 +index b1b0df7..1064b41 100644 --- a/winsup/cygwin/Makefile.am +++ b/winsup/cygwin/Makefile.am -@@ -685,7 +685,7 @@ man_MANS = regex/regex.3 regex/regex.7 +@@ -699,7 +699,7 @@ man_MANS = regex/regex.3 regex/regex.7 install-exec-hook: install-libs install-data-local: install-headers install-ldif diff --git a/msys2-runtime/0029-POSIX-ify-the-SHELL-variable.patch b/msys2-runtime/0029-POSIX-ify-the-SHELL-variable.patch index 63a9c9c6f9f8..8caea5e17baf 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 b8fcbc5f8f01b3e3b6854d50d6c7ad04c3acdd60 Mon Sep 17 00:00:00 2001 +From 23dbe3abb3525b7b44b0932589c2f5f83bf06a24 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 @@ -47,7 +47,7 @@ Signed-off-by: Johannes Schindelin 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc -index b285a7c..dad25b9 100644 +index 31c5983..c535056 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -323,6 +323,7 @@ static win_env conv_envvars[] = 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 28d8217bdeed..1b2f7aa1418f 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 9ec56bee08c6cd617db655328002182f3990de71 Mon Sep 17 00:00:00 2001 +From 678f413e6fe22af704061ba51e4cff63d96445fd 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 @@ -26,7 +26,7 @@ Signed-off-by: Johannes Schindelin 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc -index dad25b9..ffb1d5e 100644 +index c535056..99e66d5 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -323,6 +323,7 @@ static win_env conv_envvars[] = 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 df73326e5b88..264aad1962fe 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 b37e2d99550cbf816b57fac4130f355479511f25 Mon Sep 17 00:00:00 2001 +From a7b2f4cd709344fcf710c41fe549314c065b2714 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 d47e17c4b59e..40bd693c0c6f 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 59fdf7503496516e3583a665540b91eccd0626ce Mon Sep 17 00:00:00 2001 +From d10a450c300dc9dd90143f878efe3c3eeaf32675 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 @@ -17,10 +17,10 @@ Signed-off-by: Johannes Schindelin 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc -index ffb1d5e..0152095 100644 +index 99e66d5..6efa7dc 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc -@@ -1325,11 +1325,11 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, +@@ -1326,11 +1326,11 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, Note that this doesn't stop invalid strings without '=' in it etc., but we're opting for speed here for now. Adding complete checking would be pretty expensive. */ @@ -34,7 +34,7 @@ index ffb1d5e..0152095 100644 if (conv) { p = conv->native; /* Use win32 path */ -@@ -1343,7 +1343,7 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, +@@ -1344,7 +1344,7 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, } } #ifdef __MSYS__ 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 244271d9e115..eabb1be4627f 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 2a929f7b83d523f24fee28f8cf442ae6638cd7d4 Mon Sep 17 00:00:00 2001 +From 9cdf6577db74fc59366053059291bcea08e851dd 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 @@ -27,7 +27,7 @@ Signed-off-by: Johannes Schindelin 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc -index 0152095..a1abbb5 100644 +index 6efa7dc..1bc99d8 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -36,6 +36,7 @@ static char **lastenviron; @@ -46,7 +46,7 @@ index 0152095..a1abbb5 100644 {NULL, {0}, setdword, 0, {{0}, {0}}} }; -@@ -1325,7 +1327,7 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, +@@ -1326,7 +1328,7 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, Note that this doesn't stop invalid strings without '=' in it etc., but we're opting for speed here for now. Adding complete checking would be pretty expensive. */ 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 7b2568a4e417..3d83b73fb25f 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 c61a2cad2fc3969b7dae2e5abb5f36cb21b91f1f Mon Sep 17 00:00:00 2001 +From 8f9faea21196d07aabbbbb4fa91adc8b0e32d8a0 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 @@ -16,10 +16,10 @@ Signed-off-by: Johannes Schindelin 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc -index a1abbb5..0899aa0 100644 +index 1bc99d8..e64ad48 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc -@@ -1203,7 +1203,11 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, +@@ -1204,7 +1204,11 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc, { bool calc_tl = !no_envblock; #ifdef __MSYS__ diff --git a/msys2-runtime/0035-When-converting-to-a-Unix-path-avoid-double-trailing.patch b/msys2-runtime/0035-When-converting-to-a-Unix-path-avoid-double-trailing.patch index 51e946b5b534..9693796729fa 100644 --- a/msys2-runtime/0035-When-converting-to-a-Unix-path-avoid-double-trailing.patch +++ b/msys2-runtime/0035-When-converting-to-a-Unix-path-avoid-double-trailing.patch @@ -1,4 +1,4 @@ -From ae05533855590aa8cf25baf12d1cfa4c4060bcad Mon Sep 17 00:00:00 2001 +From 3bd47a4e2bdfec933d0e6abf7d8e8b6a8dc54bbc Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 8 Nov 2022 16:24:20 +0100 Subject: [PATCH 35/N] When converting to a Unix path, avoid double trailing @@ -18,10 +18,10 @@ Signed-off-by: Johannes Schindelin 1 file changed, 3 insertions(+) diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc -index 939578a..37152fb 100644 +index eff9803..bd6ec2a 100644 --- a/winsup/cygwin/mount.cc +++ b/winsup/cygwin/mount.cc -@@ -954,6 +954,9 @@ mount_info::conv_to_posix_path (const char *src_path, char *posix_path, +@@ -1018,6 +1018,9 @@ mount_info::conv_to_posix_path (const char *src_path, char *posix_path, nextchar = 1; int addslash = nextchar > 0 ? 1 : 0; diff --git a/msys2-runtime/0036-msys2_path_conv-pass-PC_NOFULL-to-path_conv.patch b/msys2-runtime/0036-msys2_path_conv-pass-PC_NOFULL-to-path_conv.patch index fd307560b8d3..cea4c3ce5144 100644 --- a/msys2-runtime/0036-msys2_path_conv-pass-PC_NOFULL-to-path_conv.patch +++ b/msys2-runtime/0036-msys2_path_conv-pass-PC_NOFULL-to-path_conv.patch @@ -1,4 +1,4 @@ -From 4f9b45e2f3f8f474632fb04cf3217bfcd0362008 Mon Sep 17 00:00:00 2001 +From e0e8caeae5f2af4b2d676e10dc9a621eed767499 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sun, 20 Nov 2022 13:57:36 +0100 Subject: [PATCH 36/N] msys2_path_conv: pass PC_NOFULL to path_conv @@ -24,10 +24,10 @@ With this change all our MSYS2 path_conv tests pass again. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/msys2_path_conv.cc b/winsup/cygwin/msys2_path_conv.cc -index 2ac1517..5c59291 100644 +index c527287..d584800 100644 --- a/winsup/cygwin/msys2_path_conv.cc +++ b/winsup/cygwin/msys2_path_conv.cc -@@ -626,7 +626,7 @@ void posix_to_win32_path(const char* from, const char* to, char** dst, const cha +@@ -682,7 +682,7 @@ void posix_to_win32_path(const char* from, const char* to, char** dst, const cha strncpy(one_path, from, to-from); one_path[to-from] = '\0'; diff --git a/msys2-runtime/0037-Revert-Cygwin-Enable-dynamicbase-on-the-Cygwin-DLL-b.patch b/msys2-runtime/0037-Revert-Cygwin-Enable-dynamicbase-on-the-Cygwin-DLL-b.patch index bd783302b3f9..463a7c120a61 100644 --- a/msys2-runtime/0037-Revert-Cygwin-Enable-dynamicbase-on-the-Cygwin-DLL-b.patch +++ b/msys2-runtime/0037-Revert-Cygwin-Enable-dynamicbase-on-the-Cygwin-DLL-b.patch @@ -1,4 +1,4 @@ -From dc56727377ac713252819b0c2218d34a7d72ae92 Mon Sep 17 00:00:00 2001 +From 2a46fefe5a41085fb354d35adc697b1fb70ad82c Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sat, 17 Dec 2022 20:14:49 +0100 Subject: [PATCH 37/N] Revert "Cygwin: Enable dynamicbase on the Cygwin DLL by @@ -13,16 +13,16 @@ https://cygwin.com/pipermail/cygwin/2022-December/252711.html 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/winsup/cygwin/Makefile.am b/winsup/cygwin/Makefile.am -index 673bb7b..ec782dc 100644 +index 1064b41..76b54eb 100644 --- a/winsup/cygwin/Makefile.am +++ b/winsup/cygwin/Makefile.am -@@ -585,8 +585,7 @@ $(NEW_DLL_NAME): $(LDSCRIPT) libdll.a $(VERSION_OFILES) $(LIBSERVER)\ +@@ -600,8 +600,7 @@ $(NEW_DLL_NAME): $(LDSCRIPT) libdll.a $(VERSION_OFILES) $(LIBSERVER)\ $(newlib_build)/libm.a $(newlib_build)/libc.a $(AM_V_CXXLD)$(CXX) $(CXXFLAGS) \ -mno-use-libstdc-wrappers \ - -Wl,--gc-sections -nostdlib -Wl,-T$(LDSCRIPT) \ - -Wl,--dynamicbase -static \ + -Wl,--gc-sections -nostdlib -Wl,-T$(LDSCRIPT) -static \ + $${SOURCE_DATE_EPOCH:+-Wl,--no-insert-timestamp} \ -Wl,--heap=0 -Wl,--out-implib,msysdll.a -shared -o $@ \ -e @DLL_ENTRY@ $(DEF_FILE) \ - -Wl,-whole-archive libdll.a -Wl,-no-whole-archive \ diff --git a/msys2-runtime/0038-dumper-avoid-linker-problem-when-libbfd-depends-on-l.patch b/msys2-runtime/0038-dumper-avoid-linker-problem-when-libbfd-depends-on-l.patch index 793c737b5057..5a6276f7a089 100644 --- a/msys2-runtime/0038-dumper-avoid-linker-problem-when-libbfd-depends-on-l.patch +++ b/msys2-runtime/0038-dumper-avoid-linker-problem-when-libbfd-depends-on-l.patch @@ -1,4 +1,4 @@ -From 58e01d2be06adfd9fb70615bf50750635a880a26 Mon Sep 17 00:00:00 2001 +From 06562dd490144e34934b63a5ba185a65cedc6d43 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 1 Feb 2023 15:08:16 +0100 Subject: [PATCH 38/N] dumper: avoid linker problem when `libbfd` depends on @@ -19,7 +19,7 @@ Signed-off-by: Johannes Schindelin 2 files changed, 9 insertions(+) diff --git a/winsup/configure.ac b/winsup/configure.ac -index e55e19a..59b77fe 100644 +index b88f3ad..0c7e13d 100644 --- a/winsup/configure.ac +++ b/winsup/configure.ac @@ -129,6 +129,11 @@ AC_CHECK_LIB([sframe], [sframe_decode], [BFD_LIBS="${BFD_LIBS} -lsframe"]) @@ -35,12 +35,12 @@ index e55e19a..59b77fe 100644 Makefile cygwin/Makefile diff --git a/winsup/utils/Makefile.am b/winsup/utils/Makefile.am -index fa6499d..f10335e 100644 +index 57a4f37..092058a 100644 --- a/winsup/utils/Makefile.am +++ b/winsup/utils/Makefile.am -@@ -88,6 +88,10 @@ profiler_CXXFLAGS = -I$(srcdir) -idirafter ${top_srcdir}/cygwin/local_includes - - profiler_LDADD = $(LDADD) -lntdll +@@ -90,6 +90,10 @@ profiler_LDADD = $(LDADD) -lntdll cygps_LDADD = $(LDADD) -lpsapi -lntdll + newgrp_LDADD = $(LDADD) -luserenv +if HAVE_LIBSFRAME +dumper_LDADD += -lsframe diff --git a/msys2-runtime/0039-path-conversion-Introduce-ability-to-switch-off-conv.patch b/msys2-runtime/0039-path-conversion-Introduce-ability-to-switch-off-conv.patch index ef9d1accb9f7..7338fe3a1914 100644 --- a/msys2-runtime/0039-path-conversion-Introduce-ability-to-switch-off-conv.patch +++ b/msys2-runtime/0039-path-conversion-Introduce-ability-to-switch-off-conv.patch @@ -1,4 +1,4 @@ -From 4f2214a1d6349884135f0485a36e3bfad31350a2 Mon Sep 17 00:00:00 2001 +From e75096f3e10c763dc8aa1b0f0c8bd469d3eacf6b 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 39/N] path-conversion: Introduce ability to switch off @@ -31,14 +31,14 @@ convenient catch-all "just don't convert anything" knob. Signed-off-by: 마누엘 Signed-off-by: Johannes Schindelin --- - winsup/cygwin/msys2_path_conv.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) + winsup/cygwin/msys2_path_conv.cc | 10 ++++++++++ + 1 file changed, 10 insertions(+) diff --git a/winsup/cygwin/msys2_path_conv.cc b/winsup/cygwin/msys2_path_conv.cc -index 5c59291..875be6f 100644 +index d584800..4c0cc82 100644 --- a/winsup/cygwin/msys2_path_conv.cc +++ b/winsup/cygwin/msys2_path_conv.cc -@@ -341,6 +341,14 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en +@@ -341,6 +341,16 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en if (*it == '\0' || it == end) return NONE; @@ -47,9 +47,11 @@ index 5c59291..875be6f 100644 + */ + const char *no_pathconv = getenv ("MSYS_NO_PATHCONV"); + -+ if (no_pathconv) -+ return NONE; ++ if (no_pathconv) { ++ *src = end; ++ return NONE; ++ } + - while (!isalnum(*it) && *it != '/' && *it != '\\' && *it != ':' && *it != '-' && *it != '.') { - recurse = true; - it = ++*src; + /* Let's not convert ~/.file to ~C:\msys64\.file */ + if (*it == '~') { + skip_p2w: diff --git a/msys2-runtime/0040-fixup-Add-functionality-for-converting-UNIX-paths-in.patch b/msys2-runtime/0040-fixup-Add-functionality-for-converting-UNIX-paths-in.patch deleted file mode 100644 index e5f5d43b7eb5..000000000000 --- a/msys2-runtime/0040-fixup-Add-functionality-for-converting-UNIX-paths-in.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 7f5ce2cb55bf18020a68f88c2861ea862feb8178 Mon Sep 17 00:00:00 2001 -From: Johannes Schindelin -Date: Sun, 15 Feb 2015 11:45:48 +0000 -Subject: [PATCH 40/N] fixup! Add functionality for converting UNIX paths in - arguments and environment variables to Windows form for native Win32 - applications. - -This teaches MSYS2's path conversion to leave arguments starting with a -tilde or quote alone: It is not a good idea to expand, say, ~/.gitconfig -partially: replacing it by ~C:\msys64\.gitconfig is most likely the -wrong thing to do! - -This addresses the expectations of the following test cases in the test -suite of https://github.com/git/git/tree/v2.43.0: - --t0001.19 init with init.templatedir using ~ expansion --t0003.12 core.attributesfile --t0003.13 attribute test: read paths from stdin --t0003.15 attribute test: --all option --t0003.16 attribute test: --cached option --t0003.17 root subdir attribute test --t0003.18 negative patterns --t0003.19 patterns starting with exclamation --t0003.20 "**" test --t0003.21 "**" with no slashes test --t0003.23 using --source --t0003.32 bare repository: check that --cached honors index --t0003.34 binary macro expanded by -a --t0003.35 query binary macro directly --t0003.40 large attributes line ignored in tree --t0003.41 large attributes line ignores trailing content in tree --t0003.43 large attributes line ignored in index --t0003.44 large attributes line ignores trailing content in index --t0068.1 run based on configured value - -Signed-off-by: Johannes Schindelin ---- - winsup/cygwin/msys2_path_conv.cc | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/winsup/cygwin/msys2_path_conv.cc b/winsup/cygwin/msys2_path_conv.cc -index 875be6f..35b7757 100644 ---- a/winsup/cygwin/msys2_path_conv.cc -+++ b/winsup/cygwin/msys2_path_conv.cc -@@ -349,6 +349,13 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en - if (no_pathconv) - return NONE; - -+ /* Let's not convert ~/.file to ~C:\msys64\.file */ -+ if (*it == '~') { -+skip_p2w: -+ *src = end; -+ return NONE; -+ } -+ - while (!isalnum(*it) && *it != '/' && *it != '\\' && *it != ':' && *it != '-' && *it != '.') { - recurse = true; - it = ++*src; diff --git a/msys2-runtime/0040-proc-fix-error-the-address-of-iso15924-will-never-be.patch b/msys2-runtime/0040-proc-fix-error-the-address-of-iso15924-will-never-be.patch new file mode 100644 index 000000000000..53a3875be6fa --- /dev/null +++ b/msys2-runtime/0040-proc-fix-error-the-address-of-iso15924-will-never-be.patch @@ -0,0 +1,29 @@ +From 42e244512cab3eafbe00b12620b01f581912c1cf Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Thu, 1 Feb 2024 12:45:30 +0100 +Subject: [PATCH 40/N] =?UTF-8?q?proc:=20fix=20`error:=20the=20address=20o?= + =?UTF-8?q?f=20=E2=80=98iso15924=E2=80=99=20will=20never=20be=20NULL`?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The `iso15924` variable is not actually a pointer. + +Signed-off-by: Johannes Schindelin +--- + winsup/cygwin/fhandler/proc.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/winsup/cygwin/fhandler/proc.cc b/winsup/cygwin/fhandler/proc.cc +index be107cb..cf40e82 100644 +--- a/winsup/cygwin/fhandler/proc.cc ++++ b/winsup/cygwin/fhandler/proc.cc +@@ -2153,7 +2153,7 @@ format_proc_locale_proc (LPWSTR win_locale, DWORD info, LPARAM param) + if (!(cp2 = wcschr (cp + 2, L'-'))) + return TRUE; + /* Otherwise, store in iso15924 */ +- if (iso15924) ++ if (cp2 - cp + 1 < ENCODING_LEN) + wcpcpy (wcpncpy (iso15924, cp, cp2 - cp), L";"); + } + cp = wcsrchr (win_locale, L'-'); diff --git a/msys2-runtime/0041-Cygwin-console-Fix-exit-code-for-non-cygwin-process.patch b/msys2-runtime/0041-Cygwin-console-Fix-exit-code-for-non-cygwin-process.patch new file mode 100644 index 000000000000..1820b54f76db --- /dev/null +++ b/msys2-runtime/0041-Cygwin-console-Fix-exit-code-for-non-cygwin-process.patch @@ -0,0 +1,46 @@ +From 2ba3c86744b13ba2433e19da2b242ad02dee76ea Mon Sep 17 00:00:00 2001 +From: Takashi Yano +Date: Fri, 2 Feb 2024 13:59:19 +0900 +Subject: [PATCH 41/N] Cygwin: console: Fix exit code for non-cygwin process. + +If non-cygwin process is executed in console, the exit code is not +set correctly. This is because the stub process for non-cygwin app +crashes in fhandler_console::set_disable_master_thread() due to NULL +pointer dereference. This bug was introduced by the commit: +3721a756b0d8 ("Cygwin: console: Make the console accessible from +other terminals."), that the pointer cons is accessed before fixing +when it is NULL. This patch fixes the issue. + +Fixes: 3721a756b0d8 ("Cygwin: console: Make the console accessible from other terminals.") +Reported-by: Johannes Schindelin +Signed-off-by: Takashi Yano +Backported-from: aa73e11524 (Cygwin: console: Fix exit code for non-cygwin process., 2024-02-02) +Signed-off-by: Johannes Schindelin +--- + winsup/cygwin/fhandler/console.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/winsup/cygwin/fhandler/console.cc b/winsup/cygwin/fhandler/console.cc +index b924a6b..6a42b49 100644 +--- a/winsup/cygwin/fhandler/console.cc ++++ b/winsup/cygwin/fhandler/console.cc +@@ -4537,9 +4537,6 @@ fhandler_console::need_console_handler () + void + fhandler_console::set_disable_master_thread (bool x, fhandler_console *cons) + { +- const _minor_t unit = cons->get_minor (); +- if (con.disable_master_thread == x) +- return; + if (cons == NULL) + { + if (cygheap->ctty && cygheap->ctty->get_major () == DEV_CONS_MAJOR) +@@ -4547,6 +4544,9 @@ fhandler_console::set_disable_master_thread (bool x, fhandler_console *cons) + else + return; + } ++ const _minor_t unit = cons->get_minor (); ++ if (con.disable_master_thread == x) ++ return; + cons->acquire_input_mutex (mutex_timeout); + con.disable_master_thread = x; + cons->release_input_mutex (); diff --git a/msys2-runtime/0041-fixup-Add-functionality-for-converting-UNIX-paths-in.patch b/msys2-runtime/0041-fixup-Add-functionality-for-converting-UNIX-paths-in.patch deleted file mode 100644 index e0295cfde768..000000000000 --- a/msys2-runtime/0041-fixup-Add-functionality-for-converting-UNIX-paths-in.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 4b20e4fc67735ce82bb47c60a6e8f46bbcb33127 Mon Sep 17 00:00:00 2001 -From: Johannes Schindelin -Date: Wed, 18 Feb 2015 11:07:17 +0000 -Subject: [PATCH 41/N] fixup! Add functionality for converting UNIX paths in - arguments and environment variables to Windows form for native Win32 - applications. - -Let's teach MSYS2's path conversion to leave Git's :name and :/message -arguments alone, please. These arguments start with colons and are hence -unlikely to contain a path list (a path list starting with a colon would -start with an empty item?!?). - -Without this patch, you will see this: - -$ GIT_TRACE=1 /c/Program\ Files/Git/cmd/git version :/message -13:48:44.258390 exec-cmd.c:244 trace: resolved executable dir: C:/Program Files/Git/mingw64/bin -13:48:44.269314 git.c:463 trace: built-in: git version ';C:\msys64\message' -git version 2.43.0.windows.1 - -In other words, the argument `:/message` is mangled in an undesired way. - -This addresses the expectations of the following test cases in the test -suite of https://github.com/git/git/tree/v2.43.0: - --t0060.81 :\\abc is an absolute path --t1501.35 Auto discovery --t1501.36 $GIT_DIR/common overrides core.worktree --t1501.37 $GIT_WORK_TREE overrides $GIT_DIR/common --t1506.3 correct relative file objects (0) --t1506.8 correct relative file objects (5) --t1506.9 correct relative file objects (6) --t2070.7 restore --staged uses HEAD as source --t3013.16 git ls-files --format with relative path --t3400.6 rebase, with and specified as :/quuxery --t3404.84 rebase -i, with and specified as :/quuxery --t3703.2 add :/ --t3703.3 add :/anothersub --t4202.8 oneline --t4202.22 git log --no-walk sorts by commit time --t4202.23 git log --no-walk=sorted sorts by commit time --t4202.24 git log --line-prefix="=== " --no-walk sorts by commit time --t4202.25 git log --no-walk=unsorted leaves list of commits as given --t4202.26 git show leaves list of commits as given --t4202.138 log --source paints branch names --t4202.139 log --source paints tag names --t4202.140 log --source paints symmetric ranges --t4208.2 "git log :/" should not be ambiguous --t4208.3 "git log :/a" should be ambiguous (applied both rev and worktree) --t4208.4 "git log :/a -- " should not be ambiguous --t4208.5 "git log :/detached -- " should find a commit only in HEAD --t4208.7 "git log :/detached -- " should find HEAD only of own worktree --t4208.10 "git log :/in" should not be ambiguous --t4208.13 git log HEAD -- :/ --t5616.43 lazy-fetch in submodule succeeds --t6132.7 t_e_i() exclude sub2 from sub --t6132.14 m_p_d() exclude sub2 from sub --t6132.19 grep --untracked PATTERN --t6132.21 grep --untracked PATTERN :(exclude)*FILE --t6133.6 :/*.t from a subdir dwims to a pathspec --t7201.14 checkout to detach HEAD with :/message --t9903.37 prompt - untracked files status indicator - untracked files --t9903.39 prompt - untracked files status indicator - non-empty untracked dir --t9903.40 prompt - untracked files status indicator - untracked files outside cwd --t9903.44 prompt - untracked files status indicator - shell variable set with config enabled --t9903.56 prompt - bash color pc mode - untracked files status indicator - -Signed-off-by: Johannes Schindelin ---- - winsup/cygwin/msys2_path_conv.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/winsup/cygwin/msys2_path_conv.cc b/winsup/cygwin/msys2_path_conv.cc -index 35b7757..8870d38 100644 ---- a/winsup/cygwin/msys2_path_conv.cc -+++ b/winsup/cygwin/msys2_path_conv.cc -@@ -356,6 +356,12 @@ skip_p2w: - return NONE; - } - -+ /* -+ * Prevent Git's :file.txt and :/message syntax from beeing modified. -+ */ -+ if (*it == ':') -+ goto skip_p2w; -+ - while (!isalnum(*it) && *it != '/' && *it != '\\' && *it != ':' && *it != '-' && *it != '.') { - recurse = true; - it = ++*src; diff --git a/msys2-runtime/0042-Work-around-fragile-include-in-binutils.patch b/msys2-runtime/0042-Work-around-fragile-include-in-binutils.patch new file mode 100644 index 000000000000..b59b596cd4b0 --- /dev/null +++ b/msys2-runtime/0042-Work-around-fragile-include-in-binutils.patch @@ -0,0 +1,83 @@ +From ef393717bbd4e2e6593143b4ea31ce3e5dcbf47c Mon Sep 17 00:00:00 2001 +From: Johannes Schindelin +Date: Fri, 2 Feb 2024 13:40:28 +0100 +Subject: [PATCH 42/N] Work around fragile `#include` in binutils +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The `bfd.h` header file that is included in `binutils` has the line +`#include "ansidecl.h"`, which is fragile because it prefers Cygwin's +`include/ansidecl.h` (as opposed to `#include `, which would +only look in the system include paths). + +This matters because as of v2.42, `bfd.h` also makes use of the +`ATTRIBUTE_WARN_UNUSED_RESULT` macro. + +So let's just copy that macro (and while at it, the other `ATTRIBUTE_*` +macros) from binutils' `ansidecl.h` file, to avoid compile errors while +compiling `dumper.o` that look like this: + + /usr/include/bfd.h:2770:1: error: expected initializer before ‘ATTRIBUTE_WARN_UNUSED_RESULT’ + 2770 | ATTRIBUTE_WARN_UNUSED_RESULT; + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Signed-off-by: Johannes Schindelin +--- + include/ansidecl.h | 43 +++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 43 insertions(+) + +diff --git a/include/ansidecl.h b/include/ansidecl.h +index 6e4bfc2..ceb356e 100644 +--- a/include/ansidecl.h ++++ b/include/ansidecl.h +@@ -283,6 +283,49 @@ So instead we use the macro below and test it against specific values. */ + # endif /* GNUC >= 4.9 */ + #endif /* ATTRIBUTE_NO_SANITIZE_UNDEFINED */ + ++/* Attribute 'nonstring' was valid as of gcc 8. */ ++#ifndef ATTRIBUTE_NONSTRING ++# if GCC_VERSION >= 8000 ++# define ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__)) ++# else ++# define ATTRIBUTE_NONSTRING ++# endif ++#endif ++ ++/* Attribute `alloc_size' was valid as of gcc 4.3. */ ++#ifndef ATTRIBUTE_RESULT_SIZE_1 ++# if (GCC_VERSION >= 4003) ++# define ATTRIBUTE_RESULT_SIZE_1 __attribute__ ((alloc_size (1))) ++# else ++# define ATTRIBUTE_RESULT_SIZE_1 ++#endif ++#endif ++ ++#ifndef ATTRIBUTE_RESULT_SIZE_2 ++# if (GCC_VERSION >= 4003) ++# define ATTRIBUTE_RESULT_SIZE_2 __attribute__ ((alloc_size (2))) ++# else ++# define ATTRIBUTE_RESULT_SIZE_2 ++#endif ++#endif ++ ++#ifndef ATTRIBUTE_RESULT_SIZE_1_2 ++# if (GCC_VERSION >= 4003) ++# define ATTRIBUTE_RESULT_SIZE_1_2 __attribute__ ((alloc_size (1, 2))) ++# else ++# define ATTRIBUTE_RESULT_SIZE_1_2 ++#endif ++#endif ++ ++/* Attribute `warn_unused_result' was valid as of gcc 3.3. */ ++#ifndef ATTRIBUTE_WARN_UNUSED_RESULT ++# if GCC_VERSION >= 3003 ++# define ATTRIBUTE_WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__)) ++# else ++# define ATTRIBUTE_WARN_UNUSED_RESULT ++# endif ++#endif ++ + /* We use __extension__ in some places to suppress -pedantic warnings + about GCC extensions. This feature didn't work properly before + gcc 2.8. */ diff --git a/msys2-runtime/0042-fixup-Add-functionality-for-converting-UNIX-paths-in.patch b/msys2-runtime/0042-fixup-Add-functionality-for-converting-UNIX-paths-in.patch deleted file mode 100644 index e6bd8c55b09a..000000000000 --- a/msys2-runtime/0042-fixup-Add-functionality-for-converting-UNIX-paths-in.patch +++ /dev/null @@ -1,145 +0,0 @@ -From cfc7696e0825563fb4245377ab70887cde160cd1 Mon Sep 17 00:00:00 2001 -From: Johannes Schindelin -Date: Sun, 22 Feb 2015 18:33:48 +0100 -Subject: [PATCH 42/N] fixup! Add functionality for converting UNIX paths in - arguments and environment variables to Windows form for native Win32 - applications. - -With this change, MSYS2's path conversion leaves paths containing any -special characters alone. - -This addresses the expectations of the following test cases in the test -suite of https://github.com/git/git/tree/v2.43.0: - --t1091.13 set sparse-checkout using builtin --t1092.82 grep sparse directory within submodules --t1402.56 ref name '*/foo' is valid with options --refspec-pattern --t1402.57 ref name '*/foo' is valid with options --refspec-pattern --allow-onelevel --t1402.59 ref name '*/foo' is valid with options --refspec-pattern --normalize --t3001.25 ls-files with "**" patterns --t3001.26 ls-files with "**" patterns and --directory --t3070.423 wildmatch: match 'foo' '**/foo' --t3070.425 iwildmatch: match 'foo' '**/foo' --t3070.433 wildmatch: match 'XXX/foo' '**/foo' --t3070.435 iwildmatch: match 'XXX/foo' '**/foo' --t3070.437 pathmatch: match 'XXX/foo' '**/foo' --t3070.439 ipathmatch: match 'XXX/foo' '**/foo' --t3070.443 wildmatch: match 'bar/baz/foo' '**/foo' --t3070.445 iwildmatch: match 'bar/baz/foo' '**/foo' --t3070.447 pathmatch: match 'bar/baz/foo' '**/foo' --t3070.449 ipathmatch: match 'bar/baz/foo' '**/foo' --t3070.457 pathmatch: match 'bar/baz/foo' '*/foo' --t3070.459 ipathmatch: match 'bar/baz/foo' '*/foo' --t3070.467 pathmatch: match 'foo/bar/baz' '**/bar*' --t3070.469 ipathmatch: match 'foo/bar/baz' '**/bar*' --t3070.473 wildmatch: match 'deep/foo/bar/baz' '**/bar/*' --t3070.475 iwildmatch: match 'deep/foo/bar/baz' '**/bar/*' --t3070.477 pathmatch: match 'deep/foo/bar/baz' '**/bar/*' --t3070.479 ipathmatch: match 'deep/foo/bar/baz' '**/bar/*' --t3070.487 pathmatch: match 'deep/foo/bar/baz/' '**/bar/*' --t3070.489 ipathmatch: match 'deep/foo/bar/baz/' '**/bar/*' --t3070.493 wildmatch: match 'deep/foo/bar/baz/' '**/bar/**' --t3070.495 iwildmatch: match 'deep/foo/bar/baz/' '**/bar/**' --t3070.497 pathmatch: match 'deep/foo/bar/baz/' '**/bar/**' --t3070.499 ipathmatch: match 'deep/foo/bar/baz/' '**/bar/**' --t3070.513 wildmatch: match 'deep/foo/bar/' '**/bar/**' --t3070.515 iwildmatch: match 'deep/foo/bar/' '**/bar/**' --t3070.517 pathmatch: match 'deep/foo/bar/' '**/bar/**' --t3070.519 ipathmatch: match 'deep/foo/bar/' '**/bar/**' --t3070.527 pathmatch: match 'foo/bar/baz' '**/bar**' --t3070.529 ipathmatch: match 'foo/bar/baz' '**/bar**' --t3070.533 wildmatch: match 'foo/bar/baz/x' '*/bar/**' --t3070.535 iwildmatch: match 'foo/bar/baz/x' '*/bar/**' --t3070.537 pathmatch: match 'foo/bar/baz/x' '*/bar/**' --t3070.539 ipathmatch: match 'foo/bar/baz/x' '*/bar/**' --t3070.547 pathmatch: match 'deep/foo/bar/baz/x' '*/bar/**' --t3070.549 ipathmatch: match 'deep/foo/bar/baz/x' '*/bar/**' --t3070.553 wildmatch: match 'deep/foo/bar/baz/x' '**/bar/*/*' --t3070.555 iwildmatch: match 'deep/foo/bar/baz/x' '**/bar/*/*' --t3070.557 pathmatch: match 'deep/foo/bar/baz/x' '**/bar/*/*' --t3070.559 ipathmatch: match 'deep/foo/bar/baz/x' '**/bar/*/*' --t3070.633 wildmatch: match 'XXX/\' '*/\\' --t3070.635 iwildmatch: match 'XXX/\' '*/\\' --t3070.637 pathmatch: match 'XXX/\' '*/\\' --t3070.639 ipathmatch: match 'XXX/\' '*/\\' --t3070.763 wildmatch: match 'foo/bar/baz/to' '**/t[o]' --t3070.765 iwildmatch: match 'foo/bar/baz/to' '**/t[o]' --t3070.767 pathmatch: match 'foo/bar/baz/to' '**/t[o]' --t3070.769 ipathmatch: match 'foo/bar/baz/to' '**/t[o]' --t3070.1493 wildmatch: match 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt' '**/*a*b*g*n*t' --t3070.1495 iwildmatch: match 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt' '**/*a*b*g*n*t' --t3070.1497 pathmatch: match 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt' '**/*a*b*g*n*t' --t3070.1499 ipathmatch: match 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt' '**/*a*b*g*n*t' --t3070.1533 wildmatch: match 'foo/bba/arr' '*/*/*' --t3070.1535 iwildmatch: match 'foo/bba/arr' '*/*/*' --t3070.1537 pathmatch: match 'foo/bba/arr' '*/*/*' --t3070.1539 ipathmatch: match 'foo/bba/arr' '*/*/*' --t3070.1547 pathmatch: match 'foo/bb/aa/rr' '*/*/*' --t3070.1549 ipathmatch: match 'foo/bb/aa/rr' '*/*/*' --t3070.1553 wildmatch: match 'foo/bb/aa/rr' '**/**/**' --t3070.1555 iwildmatch: match 'foo/bb/aa/rr' '**/**/**' --t3070.1557 pathmatch: match 'foo/bb/aa/rr' '**/**/**' --t3070.1559 ipathmatch: match 'foo/bb/aa/rr' '**/**/**' --t3070.1583 wildmatch: match 'ab/cXd/efXg/hi' '*/*X*/*/*i' --t3070.1585 iwildmatch: match 'ab/cXd/efXg/hi' '*/*X*/*/*i' --t3070.1587 pathmatch: match 'ab/cXd/efXg/hi' '*/*X*/*/*i' --t3070.1589 ipathmatch: match 'ab/cXd/efXg/hi' '*/*X*/*/*i' --t3070.1593 wildmatch: match 'ab/cXd/efXg/hi' '**/*X*/**/*i' --t3070.1595 iwildmatch: match 'ab/cXd/efXg/hi' '**/*X*/**/*i' --t3070.1597 pathmatch: match 'ab/cXd/efXg/hi' '**/*X*/**/*i' --t3070.1599 ipathmatch: match 'ab/cXd/efXg/hi' '**/*X*/**/*i' --t5500.154 fetch-pack --diag-url ./[::1]:repo --t5500.156 fetch-pack --diag-url ./[::1]:23:repo --t5500.165 fetch-pack --diag-url [::1]:/~repo --t5500.251 fetch-pack --diag-url ./[::1]:re:po --t5500.253 fetch-pack --diag-url ./[::1]:23:re:po --t5500.262 fetch-pack --diag-url [::1]:/~re:po --t5500.348 fetch-pack --diag-url ./[::1]:re/po --t5500.350 fetch-pack --diag-url ./[::1]:23:re/po --t5500.358 fetch-pack --diag-url [::1]:re/po --t5500.359 fetch-pack --diag-url [::1]:/~re/po --t5601.63 clone [::1]:rep/home/project --t5601.66 clone [::1]:/~repo --t6018.17 rev-parse --exclude with --branches --t6018.85 rev-list --exclude with --branches --t6130.20 **/ works with --glob-pathspecs --t7817.1 setup --t7817.2 working tree grep honors sparse checkout --t7817.3 grep searches unmerged file despite not matching sparsity patterns --t7817.5 grep --recurse-submodules honors sparse checkout in submodule --t7817.7 working tree grep does not search the index with CE_VALID and SKIP_WORKTREE --t9902.55 __git_refs - full refs --t9902.58 __git_refs - remote on local file system - full refs --t9902.75 __git refs - excluding full refs - -Signed-off-by: Johannes Schindelin ---- - winsup/cygwin/msys2_path_conv.cc | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/winsup/cygwin/msys2_path_conv.cc b/winsup/cygwin/msys2_path_conv.cc -index 8870d38..2646dc0 100644 ---- a/winsup/cygwin/msys2_path_conv.cc -+++ b/winsup/cygwin/msys2_path_conv.cc -@@ -362,6 +362,21 @@ skip_p2w: - if (*it == ':') - goto skip_p2w; - -+ while (it != end && *it) { -+ switch (*it) { -+ case '`': -+ case '\'': -+ case '"': -+ case '*': -+ case '?': -+ case '[': -+ case ']': -+ goto skip_p2w; -+ } -+ ++it; -+ } -+ it = *src; -+ - while (!isalnum(*it) && *it != '/' && *it != '\\' && *it != ':' && *it != '-' && *it != '.') { - recurse = true; - it = ++*src; diff --git a/msys2-runtime/0043-Cygwin-console-Avoid-slipping-past-disable_master_th.patch b/msys2-runtime/0043-Cygwin-console-Avoid-slipping-past-disable_master_th.patch new file mode 100644 index 000000000000..a7de32d35a10 --- /dev/null +++ b/msys2-runtime/0043-Cygwin-console-Avoid-slipping-past-disable_master_th.patch @@ -0,0 +1,43 @@ +From ec35e8a4704960b29597ac5d3f528b8cb0b1f49b Mon Sep 17 00:00:00 2001 +From: Takashi Yano +Date: Sat, 3 Feb 2024 00:54:23 +0900 +Subject: [PATCH 43/N] Cygwin: console: Avoid slipping past + disable_master_thread check. + +If disable_master_thread flag is set between the code checking that +flag not be set and the code acquiring input_mutex, input record is +processed once after setting disable_master_thread flag. This patch +prevents that. + +Fixes: d4aacd50e6cf ("Cygwin: console: Add missing input_mutex guard.") +Signed-off-by: Takashi Yano +--- + winsup/cygwin/fhandler/console.cc | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/winsup/cygwin/fhandler/console.cc b/winsup/cygwin/fhandler/console.cc +index 6a42b49..1c8d383 100644 +--- a/winsup/cygwin/fhandler/console.cc ++++ b/winsup/cygwin/fhandler/console.cc +@@ -420,6 +420,12 @@ fhandler_console::cons_master_thread (handle_set_t *p, tty *ttyp) + } + + WaitForSingleObject (p->input_mutex, mutex_timeout); ++ /* Ensure accessing input recored is not disabled. */ ++ if (con.disable_master_thread) ++ { ++ ReleaseMutex (p->input_mutex); ++ continue; ++ } + total_read = 0; + switch (cygwait (p->input_handle, (DWORD) 0)) + { +@@ -4545,8 +4551,6 @@ fhandler_console::set_disable_master_thread (bool x, fhandler_console *cons) + return; + } + const _minor_t unit = cons->get_minor (); +- if (con.disable_master_thread == x) +- return; + cons->acquire_input_mutex (mutex_timeout); + con.disable_master_thread = x; + cons->release_input_mutex (); diff --git a/msys2-runtime/0043-fixup-Add-functionality-for-converting-UNIX-paths-in.patch b/msys2-runtime/0043-fixup-Add-functionality-for-converting-UNIX-paths-in.patch deleted file mode 100644 index 868acc346b57..000000000000 --- a/msys2-runtime/0043-fixup-Add-functionality-for-converting-UNIX-paths-in.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 6ed5a4279665baad20f30017adb38c6fcec3c2d3 Mon Sep 17 00:00:00 2001 -From: Johannes Schindelin -Date: Wed, 18 Feb 2015 11:07:17 +0000 -Subject: [PATCH 43/N] fixup! Add functionality for converting UNIX paths in - arguments and environment variables to Windows form for native Win32 - applications. - -We do not perform tilde expansion in the MSys2 runtime; let's leave -paths containing '/~' intact for programs that want to expand such paths -themselves. - -This addresses the expectations of the following test cases in the test -suite of https://github.com/git/git/tree/v2.43.0: - --t5500.163 fetch-pack --diag-url host:/~repo --t5500.260 fetch-pack --diag-url host:/~re:po --t5500.357 fetch-pack --diag-url host:/~re/po --t5601.65 clone host:/~repo - -Signed-off-by: Johannes Schindelin ---- - winsup/cygwin/msys2_path_conv.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/winsup/cygwin/msys2_path_conv.cc b/winsup/cygwin/msys2_path_conv.cc -index 2646dc0..b292add 100644 ---- a/winsup/cygwin/msys2_path_conv.cc -+++ b/winsup/cygwin/msys2_path_conv.cc -@@ -372,6 +372,10 @@ skip_p2w: - case '[': - case ']': - goto skip_p2w; -+ case '/': -+ if (it + 1 < end && it[1] == '~') -+ goto skip_p2w; -+ break; - } - ++it; - } diff --git a/msys2-runtime/0044-Cygwin-pty-Fix-handle-leak-in-master-process.patch b/msys2-runtime/0044-Cygwin-pty-Fix-handle-leak-in-master-process.patch new file mode 100644 index 000000000000..16b5b1dc0359 --- /dev/null +++ b/msys2-runtime/0044-Cygwin-pty-Fix-handle-leak-in-master-process.patch @@ -0,0 +1,31 @@ +From c73fabb33aaff3978ad8364c4815e44b13e9749b Mon Sep 17 00:00:00 2001 +From: Takashi Yano +Date: Tue, 13 Feb 2024 11:17:46 +0900 +Subject: [PATCH 44/N] Cygwin: pty: Fix handle leak in master process. + +If non-cygwin process is started in pty, closing from_master_nat +pipe handle was missing in fhandler_pty_slave::input_transfer(). +This occured because the handle was duplicated but not closed. + +https://github.com/msys2/msys2-runtime/issues/198 + +Fixes: 29431fcb5b14 ("Cygwin: pty: Inherit typeahead data between two input pipes.") +Reported-by: Hakkin Lain +Signed-off-by: Takashi Yano +Signed-off-by: Johannes Schindelin +--- + winsup/cygwin/fhandler/pty.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/winsup/cygwin/fhandler/pty.cc b/winsup/cygwin/fhandler/pty.cc +index a09dfd4..bb862c7 100644 +--- a/winsup/cygwin/fhandler/pty.cc ++++ b/winsup/cygwin/fhandler/pty.cc +@@ -4015,6 +4015,7 @@ fhandler_pty_slave::transfer_input (tty::xfer_dir dir, HANDLE from, tty *ttyp, + transfered = true;; + } + } ++ CloseHandle (to); + + /* Fix input_available_event which indicates availability in cyg pipe. */ + if (dir == tty::to_nat) /* all data is transfered to nat pipe, diff --git a/msys2-runtime/0044-fixup-Add-functionality-for-converting-UNIX-paths-in.patch b/msys2-runtime/0044-fixup-Add-functionality-for-converting-UNIX-paths-in.patch deleted file mode 100644 index aac799a1e86c..000000000000 --- a/msys2-runtime/0044-fixup-Add-functionality-for-converting-UNIX-paths-in.patch +++ /dev/null @@ -1,69 +0,0 @@ -From c94cf814671d0c2891d9f82495c42608b39ef5bd Mon Sep 17 00:00:00 2001 -From: Johannes Schindelin -Date: Wed, 18 Feb 2015 11:07:17 +0000 -Subject: [PATCH 44/N] fixup! Add functionality for converting UNIX paths in - arguments and environment variables to Windows form for native Win32 - applications. - -This skips posix-to-windows conversion when '::' is seen: The substring -'::' most often found in an IPv6 address, never in a path (and only in -bogus path lists that contain empty elements). - -This addresses the expectations of the following test cases in the test -suite of https://github.com/git/git/tree/v2.43.0: - --t0060.197 test_submodule_relative_url: (null) helper:://hostname/repo ../subrepo => helper:://hostname/subrepo --t0060.198 test_submodule_relative_url: (null) helper:://hostname/repo ../../subrepo => helper:://subrepo --t0060.199 test_submodule_relative_url: (null) helper:://hostname/repo ../../../subrepo => helper::/subrepo --t0060.200 test_submodule_relative_url: (null) helper:://hostname/repo ../../../../subrepo => helper::subrepo --t0060.201 test_submodule_relative_url: (null) helper:://hostname/repo ../../../../../subrepo => helper:subrepo --t0060.202 test_submodule_relative_url: (null) helper:://hostname/repo ../../../../../../subrepo => .:subrepo --t5801.2 cloning from local repo --t5801.4 pulling from local repo --t5801.5 pushing to local repo --t5801.6 fetch new branch --t5801.7 fetch multiple branches --t5801.8 push when remote has extra refs --t5801.9 push new branch by name --t5801.10 push new branch with old:new refspec --t5801.11 push new branch with HEAD:new refspec --t5801.12 push delete branch --t5801.13 forced push --t5801.14 cloning without refspec --t5801.15 pulling without refspecs --t5801.16 pushing without refspecs --t5801.17 pulling without marks --t5801.19 push all with existing object --t5801.20 push ref with existing object --t5801.23 push update refs --t5801.24 push update refs disabled by no-private-update --t5801.25 push update refs failure --t5801.26 proper failure checks for fetching --t5801.27 proper failure checks for pushing --t5801.28 push messages --t5801.29 fetch HEAD --t5801.30 fetch url --t5801.31 fetch tag --t7400.80 ../subrepo works with helper URL- helper:://hostname/repo - -Signed-off-by: Johannes Schindelin ---- - winsup/cygwin/msys2_path_conv.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/winsup/cygwin/msys2_path_conv.cc b/winsup/cygwin/msys2_path_conv.cc -index b292add..71c4735 100644 ---- a/winsup/cygwin/msys2_path_conv.cc -+++ b/winsup/cygwin/msys2_path_conv.cc -@@ -376,6 +376,11 @@ skip_p2w: - if (it + 1 < end && it[1] == '~') - goto skip_p2w; - break; -+ case ':': -+ // Avoid mangling IPv6 addresses -+ if (it + 1 < end && it[1] == ':') -+ goto skip_p2w; -+ break; - } - ++it; - } diff --git a/msys2-runtime/0045-Cygwin-pty-Fix-potential-handle-leak-regarding-CallN.patch b/msys2-runtime/0045-Cygwin-pty-Fix-potential-handle-leak-regarding-CallN.patch new file mode 100644 index 000000000000..26e9210fbb0c --- /dev/null +++ b/msys2-runtime/0045-Cygwin-pty-Fix-potential-handle-leak-regarding-CallN.patch @@ -0,0 +1,63 @@ +From 41499b18c4e47f1703a9224f28a4482335b43faa Mon Sep 17 00:00:00 2001 +From: Takashi Yano +Date: Tue, 13 Feb 2024 11:36:05 +0900 +Subject: [PATCH 45/N] Cygwin: pty: Fix potential handle leak regarding + CallNamedPipe(). + +In pty master_thread, 6 handles are duplicated when CallNamedPipe() +requests that. Though some of them are not used so should be closed, +they were not. This causes handle leak potentially. + +Signed-off-by: Takashi Yano +Signed-off-by: Johannes Schindelin +--- + winsup/cygwin/fhandler/pty.cc | 20 ++++++++++++++++++-- + 1 file changed, 18 insertions(+), 2 deletions(-) + +diff --git a/winsup/cygwin/fhandler/pty.cc b/winsup/cygwin/fhandler/pty.cc +index bb862c7..9f0d88b 100644 +--- a/winsup/cygwin/fhandler/pty.cc ++++ b/winsup/cygwin/fhandler/pty.cc +@@ -940,6 +940,8 @@ fhandler_pty_slave::open (int flags, mode_t) + errmsg = "can't call master, %E"; + goto err; + } ++ CloseHandle (repl.to_slave_nat); /* not used. */ ++ CloseHandle (repl.to_slave); /* not used. */ + from_master_nat_local = repl.from_master_nat; + from_master_local = repl.from_master; + to_master_nat_local = repl.to_master_nat; +@@ -1218,6 +1220,10 @@ fhandler_pty_slave::reset_switch_to_nat_pipe (void) + if (!CallNamedPipe (pipe, &req, sizeof req, + &repl, sizeof repl, &len, 500)) + return; /* What can we do? */ ++ CloseHandle (repl.from_master); /* not used. */ ++ CloseHandle (repl.to_master); /* not used. */ ++ CloseHandle (repl.to_slave_nat); /* not used. */ ++ CloseHandle (repl.to_slave); /* not used. */ + CloseHandle (get_handle_nat ()); + set_handle_nat (repl.from_master_nat); + CloseHandle (get_output_handle_nat ()); +@@ -3881,10 +3887,20 @@ fhandler_pty_slave::transfer_input (tty::xfer_dir dir, HANDLE from, tty *ttyp, + if (!CallNamedPipe (pipe, &req, sizeof req, + &repl, sizeof repl, &len, 500)) + return; /* What can we do? */ ++ CloseHandle (repl.from_master_nat); /* not used. */ ++ CloseHandle (repl.from_master); /* not used. */ ++ CloseHandle (repl.to_master_nat); /* not used. */ ++ CloseHandle (repl.to_master); /* not used. */ + if (dir == tty::to_nat) +- to = repl.to_slave_nat; ++ { ++ CloseHandle (repl.to_slave); /* not used. */ ++ to = repl.to_slave_nat; ++ } + else +- to = repl.to_slave; ++ { ++ CloseHandle (repl.to_slave_nat); /* not used. */ ++ to = repl.to_slave; ++ } + } + + UINT cp_from = 0, cp_to = 0; diff --git a/msys2-runtime/0045-fixup-Add-functionality-for-converting-UNIX-paths-in.patch b/msys2-runtime/0045-fixup-Add-functionality-for-converting-UNIX-paths-in.patch deleted file mode 100644 index baf84d253946..000000000000 --- a/msys2-runtime/0045-fixup-Add-functionality-for-converting-UNIX-paths-in.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 9944652c41fb96f555d221865f4ed5d0c8b33514 Mon Sep 17 00:00:00 2001 -From: Johannes Schindelin -Date: Wed, 18 Feb 2015 11:07:17 +0000 -Subject: [PATCH 45/N] fixup! Add functionality for converting UNIX paths in - arguments and environment variables to Windows form for native Win32 - applications. - -With this commit, the POSIX-to-Windows conversion also leaves Git's -`:./` syntax alone. Such a string would otherwise be mistaken -for indicating a path list, but path lists are expected to contain only -absolute paths, which would not be the case here. - -This addresses the expectations of the following test cases in the test -suite of https://github.com/git/git/tree/v2.43.0: - --t1506.4 correct relative file objects (1) --t1506.5 correct relative file objects (2) --t1506.6 correct relative file objects (3) --t1506.7 correct relative file objects (4) --t1506.14 relative path not found --t1506.15 relative path outside worktree --t1506.16 relative path when cwd is outside worktree --t1513.5 empty prefix HEAD:./path --t1513.6 valid prefix HEAD:./path --t1513.7 valid prefix HEAD:../path --t2070.4 restore a file on worktree from another ref --t2070.5 restore a file in the index from another ref --t2070.6 restore a file in both the index and worktree from another ref --t2070.8 restore --worktree --staged uses HEAD as source --t7900.33 start and stop macOS maintenance --t7900.34 use launchctl list to prevent extra work --t7900.35 start and stop Windows maintenance --t7900.36 start and stop Linux/systemd maintenance --t7900.37 start and stop when several schedulers are available --t9300.195 Y: rewrite submodules --t9304.6 import with submodule mapping --t9304.7 paths adjusted for relative subdir - -Signed-off-by: Johannes Schindelin ---- - winsup/cygwin/msys2_path_conv.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/winsup/cygwin/msys2_path_conv.cc b/winsup/cygwin/msys2_path_conv.cc -index 71c4735..0ac47f0 100644 ---- a/winsup/cygwin/msys2_path_conv.cc -+++ b/winsup/cygwin/msys2_path_conv.cc -@@ -380,6 +380,14 @@ skip_p2w: - // Avoid mangling IPv6 addresses - if (it + 1 < end && it[1] == ':') - goto skip_p2w; -+ -+ // Leave Git's :./name syntax alone -+ if (it + 1 < end && it[1] == '.') { -+ if (it + 2 < end && it[2] == '/') -+ goto skip_p2w; -+ if (it + 3 < end && it[2] == '.' && it[3] == '/') -+ goto skip_p2w; -+ } - break; - } - ++it; diff --git a/msys2-runtime/0046-Cygwin-console-Make-VMIN-and-VTIME-work.patch b/msys2-runtime/0046-Cygwin-console-Make-VMIN-and-VTIME-work.patch new file mode 100644 index 000000000000..a34dff2cd4d2 --- /dev/null +++ b/msys2-runtime/0046-Cygwin-console-Make-VMIN-and-VTIME-work.patch @@ -0,0 +1,73 @@ +From 51aae372875a4f1dddfc1b2782fc7ace781d3e58 Mon Sep 17 00:00:00 2001 +From: Takashi Yano +Date: Tue, 13 Feb 2024 11:42:42 +0900 +Subject: [PATCH 46/N] Cygwin: console: Make VMIN and VTIME work. + +Previously, VMIN and VTIME did not work at all. This patch fixes that. + +Signed-off-by: Takashi Yano +Signed-off-by: Johannes Schindelin +--- + winsup/cygwin/fhandler/console.cc | 26 ++++++++++++++++++-------- + 1 file changed, 18 insertions(+), 8 deletions(-) + +diff --git a/winsup/cygwin/fhandler/console.cc b/winsup/cygwin/fhandler/console.cc +index 1c8d383..b0907eb 100644 +--- a/winsup/cygwin/fhandler/console.cc ++++ b/winsup/cygwin/fhandler/console.cc +@@ -1131,10 +1131,14 @@ fhandler_console::read (void *pv, size_t& buflen) + + push_process_state process_state (PID_TTYIN); + +- int copied_chars = 0; ++ size_t copied_chars = 0; + +- DWORD timeout = is_nonblocking () ? 0 : INFINITE; ++ DWORD timeout = is_nonblocking () ? 0 : ++ (get_ttyp ()->ti.c_lflag & ICANON ? INFINITE : ++ (get_ttyp ()->ti.c_cc[VMIN] == 0 ? 0 : ++ (get_ttyp ()->ti.c_cc[VTIME]*100 ? : INFINITE))); + ++read_more: + while (!input_ready && !get_cons_readahead_valid ()) + { + int bgres; +@@ -1157,6 +1161,11 @@ wait_retry: + pthread::static_cancel_self (); + /*NOTREACHED*/ + case WAIT_TIMEOUT: ++ if (copied_chars) ++ { ++ buflen = copied_chars; ++ return; ++ } + set_sig_errno (EAGAIN); + buflen = (size_t) -1; + return; +@@ -1204,19 +1213,20 @@ wait_retry: + } + + /* Check console read-ahead buffer filled from terminal requests */ +- while (con.cons_rapoi && *con.cons_rapoi && buflen) +- { +- buf[copied_chars++] = *con.cons_rapoi++; +- buflen --; +- } ++ while (con.cons_rapoi && *con.cons_rapoi && buflen > copied_chars) ++ buf[copied_chars++] = *con.cons_rapoi++; + + copied_chars += +- get_readahead_into_buffer (buf + copied_chars, buflen); ++ get_readahead_into_buffer (buf + copied_chars, buflen - copied_chars); + + if (!con_ra.ralen) + input_ready = false; + release_input_mutex (); + ++ if (buflen > copied_chars && !(get_ttyp ()->ti.c_lflag & ICANON) ++ && copied_chars < get_ttyp ()->ti.c_cc[VMIN]) ++ goto read_more; ++ + #undef buf + + buflen = copied_chars; diff --git a/msys2-runtime/0046-fixup-Add-functionality-for-converting-UNIX-paths-in.patch b/msys2-runtime/0046-fixup-Add-functionality-for-converting-UNIX-paths-in.patch deleted file mode 100644 index c22c987b326f..000000000000 --- a/msys2-runtime/0046-fixup-Add-functionality-for-converting-UNIX-paths-in.patch +++ /dev/null @@ -1,57 +0,0 @@ -From dba012d3e739305f4c08068a330cfe5db885dad6 Mon Sep 17 00:00:00 2001 -From: Johannes Schindelin -Date: Wed, 18 Feb 2015 11:07:17 +0000 -Subject: [PATCH 46/N] fixup! Add functionality for converting UNIX paths in - arguments and environment variables to Windows form for native Win32 - applications. - -Do not let MSYS2's path conversion mistake arguments starting with '@@' -for being paths. - -This addresses the expectations of the following test cases in the test -suite of https://github.com/git/git/tree/v2.43.0: - --t1508.1 setup --t1508.2 HEAD = refs/heads/new-branch --t1508.3 @{1} = new-one --t1508.4 HEAD@{1} = new-one --t1508.5 @{now} = new-two --t1508.6 HEAD@{now} = new-two --t1508.7 @{-1} = refs/heads/old-branch --t1508.8 @{-1}@{0} = old-two --t1508.9 @{-1}@{1} = old-one --t1508.10 @{u} = refs/heads/upstream-branch --t1508.11 HEAD@{u} = refs/heads/upstream-branch --t1508.12 @{u}@{1} = upstream-one --t1508.13 @{-1}@{u} = refs/heads/main --t1508.14 @{-1}@{u}@{1} = main-one --t1508.15 @ = new-two --t1508.16 @@{u} = refs/heads/upstream-branch --t1508.17 @@/at-test = refs/heads/@@/at-test --t1508.18 @at-test = refs/heads/@at-test --t1508.24 HEAD@{3} = old-two --t1508.26 switch to old-branch --t1508.27 HEAD = refs/heads/old-branch --t1508.28 HEAD@{1} = new-two --t1508.29 @{1} = old-one - -Signed-off-by: Johannes Schindelin ---- - winsup/cygwin/msys2_path_conv.cc | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/winsup/cygwin/msys2_path_conv.cc b/winsup/cygwin/msys2_path_conv.cc -index 0ac47f0..0976cf9 100644 ---- a/winsup/cygwin/msys2_path_conv.cc -+++ b/winsup/cygwin/msys2_path_conv.cc -@@ -389,6 +389,10 @@ skip_p2w: - goto skip_p2w; - } - break; -+ case '@': -+ // Paths do not contain '@@' -+ if (it + 1 < end && it[1] == '@') -+ goto skip_p2w; - } - ++it; - } diff --git a/msys2-runtime/0047-Cygwin-console-Fix-a-problem-that-minor-ID-is-incorr.patch b/msys2-runtime/0047-Cygwin-console-Fix-a-problem-that-minor-ID-is-incorr.patch new file mode 100644 index 000000000000..f88ef4561073 --- /dev/null +++ b/msys2-runtime/0047-Cygwin-console-Fix-a-problem-that-minor-ID-is-incorr.patch @@ -0,0 +1,101 @@ +From 711907eb6cc9f8783b471f90f0038943e3de1e7e Mon Sep 17 00:00:00 2001 +From: Takashi Yano +Date: Tue, 13 Feb 2024 11:45:36 +0900 +Subject: [PATCH 47/N] Cygwin: console: Fix a problem that minor ID is + incorrect in ConEmu. + +Previously, minor device number of console was not assigned correctly +in ConEmu environment. This is because console window of ConEmu is +not enumerated by EnumWindows(). This patch fixes the issue. + +Signed-off-by: Takashi Yano +Signed-off-by: Johannes Schindelin +--- + winsup/cygwin/autoload.cc | 2 ++ + winsup/cygwin/devices.cc | 7 +++++++ + winsup/cygwin/devices.in | 7 +++++++ + winsup/cygwin/fhandler/console.cc | 14 ++++++++++++++ + 4 files changed, 30 insertions(+) + +diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc +index c1a124c..71eb3a5 100644 +--- a/winsup/cygwin/autoload.cc ++++ b/winsup/cygwin/autoload.cc +@@ -550,7 +550,9 @@ LoadDLLfunc (DefWindowProcW, user32) + LoadDLLfunc (DestroyWindow, user32) + LoadDLLfunc (DispatchMessageW, user32) + LoadDLLfunc (EmptyClipboard, user32) ++LoadDLLfunc (EnumChildWindows, user32) + LoadDLLfunc (EnumWindows, user32) ++LoadDLLfunc (GetClassNameA, user32) + LoadDLLfunc (GetClipboardData, user32) + LoadDLLfunc (GetDC, user32) + LoadDLLfunc (GetForegroundWindow, user32) +diff --git a/winsup/cygwin/devices.cc b/winsup/cygwin/devices.cc +index 167b0e4..ca1fdf3 100644 +--- a/winsup/cygwin/devices.cc ++++ b/winsup/cygwin/devices.cc +@@ -81,6 +81,13 @@ enum_cons_dev (HWND hw, LPARAM lp) + UnmapViewOfFile ((void *) cs); + CloseHandle (h); + } ++ else ++ { /* Only for ConEmu */ ++ char class_hw[32]; ++ if (19 == GetClassName (hw, class_hw, sizeof (class_hw)) ++ && 0 == strcmp (class_hw, "VirtualConsoleClass")) ++ EnumChildWindows (hw, enum_cons_dev, lp); ++ } + return TRUE; + } + +diff --git a/winsup/cygwin/devices.in b/winsup/cygwin/devices.in +index 48d3843..842f09c 100644 +--- a/winsup/cygwin/devices.in ++++ b/winsup/cygwin/devices.in +@@ -77,6 +77,13 @@ enum_cons_dev (HWND hw, LPARAM lp) + UnmapViewOfFile ((void *) cs); + CloseHandle (h); + } ++ else ++ { /* Only for ConEmu */ ++ char class_hw[32]; ++ if (19 == GetClassName (hw, class_hw, sizeof (class_hw)) ++ && 0 == strcmp (class_hw, "VirtualConsoleClass")) ++ EnumChildWindows (hw, enum_cons_dev, lp); ++ } + return TRUE; + } + +diff --git a/winsup/cygwin/fhandler/console.cc b/winsup/cygwin/fhandler/console.cc +index b0907eb..70824e6 100644 +--- a/winsup/cygwin/fhandler/console.cc ++++ b/winsup/cygwin/fhandler/console.cc +@@ -250,6 +250,13 @@ enum_windows (HWND hw, LPARAM lp) + UnmapViewOfFile ((void *) cs); + CloseHandle (h); + } ++ else ++ { /* Only for ConEmu */ ++ char class_hw[32]; ++ if (19 == GetClassName (hw, class_hw, sizeof (class_hw)) ++ && 0 == strcmp (class_hw, "VirtualConsoleClass")) ++ EnumChildWindows (hw, enum_windows, lp); ++ } + return TRUE; + } + +@@ -656,6 +663,13 @@ scan_console (HWND hw, LPARAM lp) + UnmapViewOfFile ((void *) cs); + CloseHandle (h); + } ++ else ++ { /* Only for ConEmu */ ++ char class_hw[32]; ++ if (19 == GetClassName (hw, class_hw, sizeof (class_hw)) ++ && 0 == strcmp (class_hw, "VirtualConsoleClass")) ++ EnumChildWindows (hw, scan_console, lp); ++ } + return TRUE; + } + diff --git a/msys2-runtime/0047-fixup-Add-functionality-for-converting-UNIX-paths-in.patch b/msys2-runtime/0047-fixup-Add-functionality-for-converting-UNIX-paths-in.patch deleted file mode 100644 index a089ccb0e0e4..000000000000 --- a/msys2-runtime/0047-fixup-Add-functionality-for-converting-UNIX-paths-in.patch +++ /dev/null @@ -1,63 +0,0 @@ -From e9a55f1ac61a079533fa01a3dad2b65e721d13f3 Mon Sep 17 00:00:00 2001 -From: Johannes Schindelin -Date: Wed, 18 Feb 2015 11:07:17 +0000 -Subject: [PATCH 47/N] fixup! Add functionality for converting UNIX paths in - arguments and environment variables to Windows form for native Win32 - applications. - -Let's prevent scp-style arguments from being mangled by MSYS2's path -conversion. - -An argument like `me@example.com:/tmp/` is not something we should convert -into a Windows path; Use the absence of a slash before the colon as a -tell-tale that it is *not* a POSIX path list (exception: if the part -left of the colon is `.` or `..`). - -This addresses the expectations of the following test cases in the test -suite of https://github.com/git/git/tree/v2.43.0: - --t5516.8 fetch with insteadOf --t5516.16 push with insteadOf --t5516.17 push with pushInsteadOf --t5602.2 clone calls git upload-pack unqualified with no -u option --t5602.3 clone calls specified git upload-pack with -u option --t5603.31 clone of host:/ goes to host (non-bare) --t5603.35 clone of user@host:/ goes to host (non-bare) --t5813.81 full paths still work - -Signed-off-by: Johannes Schindelin ---- - winsup/cygwin/msys2_path_conv.cc | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/winsup/cygwin/msys2_path_conv.cc b/winsup/cygwin/msys2_path_conv.cc -index 0976cf9..1e9cdbe 100644 ---- a/winsup/cygwin/msys2_path_conv.cc -+++ b/winsup/cygwin/msys2_path_conv.cc -@@ -470,6 +470,8 @@ skip_p2w: - - int starts_with_minus = 0; - int starts_with_minus_alpha = 0; -+ int only_dots = *it == '.'; -+ int has_slashes = 0; - if (*it == '-') { - starts_with_minus = 1; - it += 1; -@@ -513,11 +515,17 @@ skip_p2w: - if (ch == '/' && *(it2 + 1) == '/') { - return URL; - } else { -+ if (!only_dots && !has_slashes) -+ goto skip_p2w; - return POSIX_PATH_LIST; - } - } else if (memchr(it2, '=', end - it2) == NULL) { - return SIMPLE_WINDOWS_PATH; - } -+ } else if (ch != '.') { -+ only_dots = 0; -+ if (ch == '/' || ch == '\\') -+ has_slashes = 1; - } - } - diff --git a/msys2-runtime/0048-Handle-8-bit-characters-under-LOCALE-C.patch b/msys2-runtime/0048-Handle-8-bit-characters-under-LOCALE-C.patch deleted file mode 100644 index dcb1384236bd..000000000000 --- a/msys2-runtime/0048-Handle-8-bit-characters-under-LOCALE-C.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 6ab2da6525debb34ba20ecf85fc431e44c52ff09 Mon Sep 17 00:00:00 2001 -From: Johannes Schindelin -Date: Fri, 20 Feb 2015 13:56:22 +0000 -Subject: [PATCH 48/N] Handle 8-bit characters under LOCALE=C - -When the character set is specified as ASCII (by setting the locale to -`C`), we should handle data outside the 7-bit range gracefully by simply -copying it, even if it is technically no longer ASCII. - -Cygwin, however, wants to be a lot stricter than that. - -Let's be more lenient in MSYS2 by making the strict 7-bit only handling -contingent on the `STRICTLY_7BIT_ASCII` macro (which we never set -because we don't want it). - -This addresses the expectations of two of Git's test cases: -t7400.108(submodule with UTF-8 name) and t9300.193(X: handling -encoding). - -Signed-off-by: Johannes Schindelin ---- - newlib/libc/stdlib/mbtowc_r.c | 2 +- - newlib/libc/stdlib/wctomb_r.c | 2 +- - winsup/cygwin/strfuncs.cc | 4 ++++ - 3 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/newlib/libc/stdlib/mbtowc_r.c b/newlib/libc/stdlib/mbtowc_r.c -index ca876f9..ee43736 100644 ---- a/newlib/libc/stdlib/mbtowc_r.c -+++ b/newlib/libc/stdlib/mbtowc_r.c -@@ -36,7 +36,7 @@ __ascii_mbtowc (struct _reent *r, - if (n == 0) - return -2; - --#ifdef __CYGWIN__ -+#ifdef STRICTLY_7BIT_ASCII - if ((wchar_t)*t >= 0x80) - { - _REENT_ERRNO(r) = EILSEQ; -diff --git a/newlib/libc/stdlib/wctomb_r.c b/newlib/libc/stdlib/wctomb_r.c -index a7f87cd..2c536ce 100644 ---- a/newlib/libc/stdlib/wctomb_r.c -+++ b/newlib/libc/stdlib/wctomb_r.c -@@ -29,7 +29,7 @@ __ascii_wctomb (struct _reent *r, - if (s == NULL) - return 0; - --#ifdef __CYGWIN__ -+#ifdef STRICTLY_7BIT_ASCII - if ((size_t)wchar >= 0x80) - #else - if ((size_t)wchar >= 0x100) -diff --git a/winsup/cygwin/strfuncs.cc b/winsup/cygwin/strfuncs.cc -index 0ab2290..ebd559b 100644 ---- a/winsup/cygwin/strfuncs.cc -+++ b/winsup/cygwin/strfuncs.cc -@@ -616,7 +616,11 @@ _sys_mbstowcs (mbtowc_p f_mbtowc, wchar_t *dst, size_t dlen, const char *src, - to store them in a symmetric way. */ - bytes = 1; - if (dst) -+#ifdef STRICTLY_7BIT_ASCII - *ptr = L'\xf000' | *pmbs; -+#else -+ *ptr = *pmbs; -+#endif - memset (&ps, 0, sizeof ps); - } - diff --git a/msys2-runtime/0049-fixup-path-conversion-Introduce-ability-to-switch-of.patch b/msys2-runtime/0049-fixup-path-conversion-Introduce-ability-to-switch-of.patch deleted file mode 100644 index 51c5200ee62b..000000000000 --- a/msys2-runtime/0049-fixup-path-conversion-Introduce-ability-to-switch-of.patch +++ /dev/null @@ -1,28 +0,0 @@ -From d40e640873870eda3b35fe3aa72a0e7dde65b7eb Mon Sep 17 00:00:00 2001 -From: Christoph Reiter -Date: Fri, 22 Dec 2023 09:32:39 +0100 -Subject: [PATCH 49/N] fixup! path-conversion: Introduce ability to switch off - conversion. - -It would just remove the argument instead of leaving it alone ---- - winsup/cygwin/msys2_path_conv.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/winsup/cygwin/msys2_path_conv.cc b/winsup/cygwin/msys2_path_conv.cc -index 1e9cdbe..f6e91a2 100644 ---- a/winsup/cygwin/msys2_path_conv.cc -+++ b/winsup/cygwin/msys2_path_conv.cc -@@ -346,8 +346,10 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en - */ - const char *no_pathconv = getenv ("MSYS_NO_PATHCONV"); - -- if (no_pathconv) -- return NONE; -+ if (no_pathconv) { -+ *src = end; -+ return NONE; -+ } - - /* Let's not convert ~/.file to ~C:\msys64\.file */ - if (*it == '~') { diff --git a/msys2-runtime/PKGBUILD b/msys2-runtime/PKGBUILD index d0e519a1ff82..16d80cc9ee7f 100644 --- a/msys2-runtime/PKGBUILD +++ b/msys2-runtime/PKGBUILD @@ -3,8 +3,8 @@ pkgbase=msys2-runtime pkgname=('msys2-runtime' 'msys2-runtime-devel') -pkgver=3.4.10 -pkgrel=5 +pkgver=3.5.0 +pkgrel=1 pkgdesc="Cygwin POSIX emulation engine" arch=('x86_64') url="https://www.cygwin.com/" @@ -67,68 +67,62 @@ source=('msys2-runtime'::git://sourceware.org/git/newlib-cygwin.git#tag=cygwin-$ 0037-Revert-Cygwin-Enable-dynamicbase-on-the-Cygwin-DLL-b.patch 0038-dumper-avoid-linker-problem-when-libbfd-depends-on-l.patch 0039-path-conversion-Introduce-ability-to-switch-off-conv.patch - 0040-fixup-Add-functionality-for-converting-UNIX-paths-in.patch - 0041-fixup-Add-functionality-for-converting-UNIX-paths-in.patch - 0042-fixup-Add-functionality-for-converting-UNIX-paths-in.patch - 0043-fixup-Add-functionality-for-converting-UNIX-paths-in.patch - 0044-fixup-Add-functionality-for-converting-UNIX-paths-in.patch - 0045-fixup-Add-functionality-for-converting-UNIX-paths-in.patch - 0046-fixup-Add-functionality-for-converting-UNIX-paths-in.patch - 0047-fixup-Add-functionality-for-converting-UNIX-paths-in.patch - 0048-Handle-8-bit-characters-under-LOCALE-C.patch - 0049-fixup-path-conversion-Introduce-ability-to-switch-of.patch - https://patch-diff.githubusercontent.com/raw/msys2/msys2-runtime/pull/196.patch) + 0040-proc-fix-error-the-address-of-iso15924-will-never-be.patch + 0041-Cygwin-console-Fix-exit-code-for-non-cygwin-process.patch + 0042-Work-around-fragile-include-in-binutils.patch + 0043-Cygwin-console-Avoid-slipping-past-disable_master_th.patch + 0044-Cygwin-pty-Fix-handle-leak-in-master-process.patch + 0045-Cygwin-pty-Fix-potential-handle-leak-regarding-CallN.patch + 0046-Cygwin-console-Make-VMIN-and-VTIME-work.patch + 0047-Cygwin-console-Fix-a-problem-that-minor-ID-is-incorr.patch) sha256sums=('SKIP' - '351bb1efdbdafe80c981e92d6b425c6ab71c85ce4e990db184e2118158eb2ab6' - 'd3d3a01feeae9f7d5e6cb32f4662df74fc9476ff11a1aac3dad2df3e43fd88e4' - '2e50ecd65f2fd413baaf39e5058a6b252245abc7d34f4ebf17dd4f7ffed60ced' - '231757d797cf9be6a92b6f6976ee85216e9fa8eaba4aca241ace4b76e41cd862' - '23f97fac32ae2ba7681985e0d4910ec2d6d265f970bb0db6cec48540b6ebf055' - 'd47c570e2ac7a9b1c15f1a9e4e51b530eef0a2dc0f261ddc088ad449840deb02' - '1bc7e3275eb9ffb3b70a0b9a5049bc6180d893d28ac6fc1d0e2ca29f8d890a33' - '8113de5e8ae37da6b96a3c7eb379806ccb1a90f42ae0d9061941d5e224f754a0' - '09ec71a8292035b38e5fb6db7fdd4f2fb6c5071ec9a7c180c72bb22216db88df' - '02cc70007deccabac988ae02a82b201a71772b0dc6570b0275793f37f71ef09d' - 'b70c4cc2f37632d51e9ddcae56f12c9ec92357e11347cb806ed23af9251a601a' - '51571b603ca6a75f22125daeb1973a9f8ecdf82b1d4637814287fa311f9480c3' - 'd4dbcdbfa4f2dbac9a06eac0cd42154e30df03466554778340dadf67ab861c8b' - '5c018ce376a7f2b0b8e3dc3a4eedc5eebf618ef2337889188e6f914d0ac09795' - '2350b6193166cab2596162d8a203a4edbddb413a615e84f7ecc120ffa98f609f' - '7d25457a43facd4231aad09bc5acf4717468a937c087427bd8cc5e2a1046db84' - '233b59d7ca0a339e09c15f7c64989ba347f1316f353d2d366dede33325b4091f' - 'b4eeb001292c5a34df2ebe65d8deef987eb70baf60f821d86c3cbccb49fea40a' - '3afbea60cc0edfc7931ecaafeb1d6b7dfda1aac10be590afd41abff8a27815ef' - '691328ad116d972eeb0d04558c68ad605e306faec26a3e43de90024e31d797d6' - 'b36301669c8e2802cc82c8ac7b99b10135f0aee12e3b01b258272e7089a9c4ed' - '231d6372dcbdb72f4cd10dad60bbdf9f4d55236193e5cbfc2377dd1af1194360' - 'c6cfb73dab426e9b7649514408d4a0577ebac43aef9c0585e720e5624c2a904e' - 'aa3c148a0655d47d9acd822547ef4e8ef35be309e71e7d85c4af8bb3a485f7db' - '4318b3e6e99f724c211b0c8b6ff93d644336a08fd29219381de9035b8f7b5415' - '4cf58088663b156ea6ca2278eb24226ef3f57f9bd486dea9b1ac7b04fa62eb0c' - '44d207e6e7cda10d427b6705735622fd7847a58d4f133862e9f82f11fd57cf0c' - '161e4bcbf55f5d4b81bdbed73e0c8fdc339c75b70cd9e292fde41b53988bfb5b' - '5528c8e0715404fc03068efcd8c42010604fe5940a7af962211066f9670276b5' - 'd121cbfed47c72787c92eb817bba2071930f86fdf2bff424d1082ceccd59da49' - '832aaa93defa111e3d9f540532288398ad27352122b1ff84a8a2f53232e601b9' - 'de44e80e60e61dbf91b6b99a3f5740f653f83b96c64f862f4aa99fd42e7db0d7' - '7cebdd623fe080bda89b0505d4e8dc8600969d3b7d71e6bdf0a7e6ac1c62708f' - '008adf33a2b3774d85aabe1b2b2a3fa32615c0cf7bfbc7cf4e4ce3c0302957d6' - 'd5981d518ba4756dd6e976e9cc20ff8f52001aac588ee083a33045d260e02d6b' - '599905c7454e2f3039c717de8186d4e1cb7943f9b47a7745ce36e4acfa100e31' - 'd37c835bc188786a4e8050f0a73d4f0b3070ded9030943ba2a6c47b03d9d96e8' - 'a799e7edde58a0ec519bb7df6d0bcf4177e1c6236a72a8240936c574be1bdd61' - 'aef2222ac4444efbd77de36bb92628f32f1467acea522e344fd28153ea235721' - '5f61639a3c449ae90358cb621c67bade1b65ebef73fda64a7bc369f6fed4b266' - '9b31f6d42920df0103f16ef51d6467b5f0db91d462545430047bf207fcc59371' - 'cda68bcfe03c76fc57435a25540c6f29aedf003bdb3dc434ecce86599f8293cc' - '3fc79c86927d0983f892e99a978ab448f808f3fcdad6e5b101f35fc213af7f63' - '22bb5e0738f16d0e8d2732307efe336226a58165d54616297aa5caf82e5bea4d' - '58d8d131f62e7424e284c012504eb704f1a94c30a8572f04f8c4d77d1501eebd' - 'f5a6e7d85741b44daf62f7f80ac1e64f0336d3be084ebe9b7ce2e796f493b952' - '73e74ea6f4f05d212fbdfab2b8dec2ad1faded660a833b24b55a058719ad7c01' - '6c4cc6db864addb7ac78c5e2cbb0be41c7f853726c08b92fa33d573c8dcf0c16' - 'f9533f44a33f192716bdb7b613c66a675f37d3c613590d505737a76c80a3e75e' - '89bf4ceb5a3ae1e462ae29dac00adc9d0f8e9557e8f6b381b906eb7e44719724') + '34a790069b69376d15134e6503dc083e043a34a9b0d0837ce415f00eb95d39c2' + '3d6d182d145f5d275a40bac20438d7807e4b8d0435fdc288bec70409cbd456b4' + '0cdd34cf88085d4a23f6654974d20ab7675b45180bb7ee7d866e3d7bc1e55b00' + '2a42cd7c44d8902cdfe3ab061e6679e58ca18150a953abdd72d57580f64393e6' + 'e65d8612fe4f8c8c73bb5d22b79cabbabc6e7faf698d99871779aa1f7f25a48f' + '494db197ef5d048cb8107fe594e56a2c5e99abcd5e70f0cdf05002db966f99d3' + 'ac7da2a8006e55c3399a301a0610b64e2cf22145982abbde6552241f57abfc1d' + '27d217ec26d88ec4f0da7786c86251952da13c2bd1b29cc45a19f7630495d58f' + '1a65b398162cf58c2dafd635fefa9b9c97007cb9fc92258bc34b41eb88bed3f2' + '07865133bf83b6d380c015261ce01a4751237c863495ef4685e01e11cbf4fa7c' + '7d66d825c7b446d92cceb757143f213622ec77613a8f3945f275eb8227cd1849' + '5b899543b9ab84c140de74ef6ccb29717e6d76609c825c7bbed8374708af5249' + 'e16eacd16988ac6630fd83e5ec78a730b4fe73bd0d7592b2292d01a68d69c4e4' + '0cc3d8da7e251bce93926e96838810233bf903106dd05ec9535ec30827c5ea2c' + '46dde0c70e64bf8947ed117bacfa46865aa26d6f238554ba961ee487989a2016' + '88ee649cd7d5ca740292ef4001f893d6cca55404a2cf63bf7e109ec0ea19703f' + 'a87c8ff5fe12118f3c6f5f09dbc498c5f8541db4447569ff805c2233c07da733' + '8d16acfac5b6a883e1d5d982ce5553e283e7e20b23cb1411284fa92de2a9b125' + '6b02918443242f3c9246149a798ab2da38df1a6ee797569b1f69f323a53c42fd' + 'ec31d784bed07761782b490569421b703936889a54722c65ca028ddfe229891f' + 'c9c6cbfcb5e0d1a07acbd8baf96de1319d2fb6a1cad0686de2ed9cf7c88fda6e' + 'b66265535e57c2e0c42ce2185ed4a168c7ed836545a4f2c9d5397a7a6fd03b5b' + '9ed5cf91f22547a6b95ba015e642ad774c309196f1ef16fca75df001168093f3' + '9a2e69b0809186524929d1c33f662831476138b7702ecea8137d92c08e29d9c9' + 'd8f6d2e2b7851e303c24ec08fd6b41515bbfbdc191808d18f4dff6d3a12625e6' + 'afac551758db3281941984e6bcaea27df81460f283b079f2a682cebdc23205cb' + 'a12b33938833ce9d117429985b6b7e10119de899f361f698daa951dcac4e3da4' + '39607a8cc325438b325e0469a1bf0d9473cabb59ee586660679d392b7e99d9e2' + '96244c1d050b1210c63112f0421dbb12dd3869f1ef9f5737fd7ef22cd897e8a2' + '5ecd4cb6e338ca4391b23aa93ad14a8b1360faed5cb6de32f8fe2c0923bebf23' + '5f441683c0e6eaba58323a391a68d97bcbf7e1864307ad09fba5b8e7aaabeef1' + 'a7afbd133daa8388e2d8882d477fbaeec096843286d9f8d5e26b6ab326b0c643' + 'c34302e243d63e3846642d9391448924d68198ce2171d5b187b7ea38a0b6a66c' + 'cf1e0e7272a11be13836fc61fc0a3935f3c3632675dde1677b4a4b11c53a02c4' + 'dd5144a89e26538d1e3f9e22c08972a08396261b8417d830d057c87b1c546b03' + '0f309d8136ae5d96d9022fd8a17b7c14d12e63a8988f894877a7029e6f3c9bf8' + '0eec9b0622232046f186a40202e11642ab8acd96ea8a2edefe0b0f7ba3ecd420' + 'd5f1a084c04b8c05927c8f6bead5a3b21174eea11d3c4a21ded5462e8e9697a3' + 'd9b9d65fc4842c897aee35242365a5c33bb9cf719f6b15345097ce2c3d7dd651' + '4942ef20d9a66a316a12198a443621b47bddababec373e8f0de9e993652209d3' + '7710fcc740f7ddc5aa3756dac841d41f0acb2f29d4240de6e70110b762d7d48a' + '5d3dfa348fda6882f9a05b263926138626dc275fba5639bebc5ae4e0d08e01b6' + 'e1175a45028526ea68e6d518ee9218eeed172c992e497f614cfc026d7e1e10be' + '89fcabc3dad10fb6b57a7bc7140c453ee222a83a1072e9cc2abf4f2b975441ff' + '084fcf5552fbff3eb8b8f4a64960f6cce38fd605e85a82f5b73abdc8bb2e545d' + 'e55d8eea8a6eb06b95f38e71538cad4b3bdeca7e22ac8232f6746c2cee58e4ca' + 'a873a8ac632ea53c622ff4c50a59f1d7e9d3ca4fb70c55bdadd90dbcd6297935') # Helper macros to help make tasks easier # apply_patch_with_msg() { @@ -205,19 +199,14 @@ prepare() { 0037-Revert-Cygwin-Enable-dynamicbase-on-the-Cygwin-DLL-b.patch \ 0038-dumper-avoid-linker-problem-when-libbfd-depends-on-l.patch \ 0039-path-conversion-Introduce-ability-to-switch-off-conv.patch \ - 0040-fixup-Add-functionality-for-converting-UNIX-paths-in.patch \ - 0041-fixup-Add-functionality-for-converting-UNIX-paths-in.patch \ - 0042-fixup-Add-functionality-for-converting-UNIX-paths-in.patch \ - 0043-fixup-Add-functionality-for-converting-UNIX-paths-in.patch \ - 0044-fixup-Add-functionality-for-converting-UNIX-paths-in.patch \ - 0045-fixup-Add-functionality-for-converting-UNIX-paths-in.patch \ - 0046-fixup-Add-functionality-for-converting-UNIX-paths-in.patch \ - 0047-fixup-Add-functionality-for-converting-UNIX-paths-in.patch \ - 0048-Handle-8-bit-characters-under-LOCALE-C.patch \ - 0049-fixup-path-conversion-Introduce-ability-to-switch-of.patch - - # https://github.com/msys2/msys2-runtime/pull/196 - apply_git_am_with_msg 196.patch + 0040-proc-fix-error-the-address-of-iso15924-will-never-be.patch \ + 0041-Cygwin-console-Fix-exit-code-for-non-cygwin-process.patch \ + 0042-Work-around-fragile-include-in-binutils.patch \ + 0043-Cygwin-console-Avoid-slipping-past-disable_master_th.patch \ + 0044-Cygwin-pty-Fix-handle-leak-in-master-process.patch \ + 0045-Cygwin-pty-Fix-potential-handle-leak-regarding-CallN.patch \ + 0046-Cygwin-console-Make-VMIN-and-VTIME-work.patch \ + 0047-Cygwin-console-Fix-a-problem-that-minor-ID-is-incorr.patch } build() { @@ -260,8 +249,8 @@ build() { package_msys2-runtime() { pkgdesc="Posix emulation engine for Windows" - conflicts=('catgets' 'libcatgets' 'msys2-runtime-3.4') - replaces=('catgets' 'libcatgets' 'msys2-runtime-3.4') + conflicts=('catgets' 'libcatgets' 'msys2-runtime-3.3' 'msys2-runtime-3.4') + replaces=('catgets' 'libcatgets' 'msys2-runtime-3.3' 'msys2-runtime-3.4') mkdir -p "${pkgdir}"/usr cp -rf "${srcdir}"/dest/usr/bin "${pkgdir}"/usr/ @@ -276,8 +265,8 @@ package_msys2-runtime() { package_msys2-runtime-devel() { pkgdesc="MSYS2 headers and libraries" depends=("msys2-runtime=${pkgver}") - conflicts=('libcatgets-devel' 'msys2-runtime-3.4-devel') - replaces=('libcatgets-devel' 'msys2-runtime-3.4-devel') + conflicts=('libcatgets-devel' 'msys2-runtime-3.3-devel' 'msys2-runtime-3.4-devel') + replaces=('libcatgets-devel' 'msys2-runtime-3.3-devel' 'msys2-runtime-3.4-devel') mkdir -p "${pkgdir}"/usr/bin cp -rLf "${srcdir}"/dest/usr/${CHOST}/include "${pkgdir}"/usr/