Commit 848b3af8 authored by Aleksey Midenkov's avatar Aleksey Midenkov Committed by Daniel Black

MDEV-30836 MTR MSYS2 fix attempt

MSYS2 is basically Cygwin, except it has more easy installation (but
with tools which are not used) and it has some more control of path
conversion via MSYS2_ARG_CONV_EXCL and MSYS2_ENV_CONV_EXCL. So it
should be more Windows-friendly than Cygwin.

Installation

Similar to Cygwin, except installing patch requires additional command
run from shell:

    pacman -S patch

MSYS2 still doesn't work as it returns wierd "Bad address" when
exec-ing forked process from create_process(). Same exec from
standalone perl -e runs just fine... :(
parent 640cd404
......@@ -23,7 +23,7 @@ use File::Path;
use Carp;
use base qw(Exporter);
our @EXPORT= qw(IS_CYGWIN IS_WINDOWS IS_WIN32PERL IS_AIX
our @EXPORT= qw(IS_CYGWIN IS_MSYS IS_WINDOWS IS_WIN32PERL IS_AIX
native_path posix_path mixed_path
check_socket_path_length process_alive open_for_append);
......@@ -34,9 +34,15 @@ BEGIN {
die "Could not execute 'cygpath': $!";
}
eval 'sub IS_CYGWIN { 1 }';
eval 'sub IS_MSYS { 0 }';
}
elsif ($^O eq "msys") {
eval 'sub IS_CYGWIN { 1 }';
eval 'sub IS_MSYS { 1 }';
}
else {
eval 'sub IS_CYGWIN { 0 }';
eval 'sub IS_MSYS { 0 }';
}
if ($^O eq "MSWin32") {
eval 'sub IS_WIN32PERL { 1 }';
......
......@@ -102,7 +102,7 @@ else
# Find the safe process binary or script
sub find_bin {
if (IS_WIN32PERL or IS_CYGWIN)
if (IS_WINDOWS)
{
# Use my_safe_process.exe
my $exe= my_find_bin($bindir, ["lib/My/SafeProcess", "My/SafeProcess"],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment