1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Use My::Platform

Put all path conversions in one file
Convert the --tmpdir  passed to "mysqld --verbose --help"


mysql-test/lib/My/Find.pm:
  Use My::Platform
mysql-test/lib/My/SafeProcess.pm:
  use My::Platform
mysql-test/lib/mtr_cases.pm:
  Use My::Platform
mysql-test/lib/mtr_misc.pl:
  Move 'mtr_native_path' to My::Platform
mysql-test/lib/My/Platform.pm:
  New BitKeeper file ``mysql-test/lib/My/Platform.pm''
mysql-test/lib/t/Platform.t:
  New BitKeeper file ``mysql-test/lib/t/Platform.t''
This commit is contained in:
unknown
2008-02-20 14:55:30 +01:00
parent 6f26028287
commit 0d01221c17
7 changed files with 162 additions and 91 deletions

View File

@@ -23,14 +23,14 @@ package My::Find;
use strict;
use Carp;
use My::Platform;
use base qw(Exporter);
our @EXPORT= qw(my_find_bin my_find_dir);
our $vs_config_dir;
my $is_win= ($^O eq "MSWin32" or $^O eq "cygwin");
my $bin_extension= ".exe" if $is_win;
my $bin_extension= ".exe" if IS_WINDOWS;
#
# my_find_bin - find an executable with "name_1...name_n" in
@@ -56,7 +56,7 @@ sub my_find_bin {
# Find and return the first executable
# -------------------------------------------------------
foreach my $path (my_find_paths($base, $paths, $names, $bin_extension)) {
return $path if ( -x $path or ($is_win and -f $path) );
return $path if ( -x $path or (IS_WINDOWS and -f $path) );
}
find_error($base, $paths, $names);
}
@@ -120,7 +120,7 @@ sub my_find_paths {
# -------------------------------------------------------
# Windows specific
# -------------------------------------------------------
if ($is_win) {
if (IS_WINDOWS) {
# Add the default extra build dirs unless a specific one has
# already been selected
push(@extra_dirs,