catch z/OS not having $Config not filling in the __perlpath env correctly
This commit is contained in:
parent
cc725e67ca
commit
e2dcf35cf5
15
check.pl
15
check.pl
@ -1,4 +1,4 @@
|
|||||||
# $MirOS: src/bin/mksh/check.pl,v 1.48 2017/05/05 19:43:50 tg Exp $
|
# $MirOS: src/bin/mksh/check.pl,v 1.49 2017/05/05 21:17:31 tg Exp $
|
||||||
# $OpenBSD: th,v 1.1 2013/12/02 20:39:44 millert Exp $
|
# $OpenBSD: th,v 1.1 2013/12/02 20:39:44 millert Exp $
|
||||||
#-
|
#-
|
||||||
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011,
|
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011,
|
||||||
@ -297,11 +297,24 @@ foreach $env (('HOME', 'LD_LIBRARY_PATH', 'LOCPATH', 'LOGNAME',
|
|||||||
}
|
}
|
||||||
$new_env{'CYGWIN'} = 'nodosfilewarning';
|
$new_env{'CYGWIN'} = 'nodosfilewarning';
|
||||||
$new_env{'ENV'} = '/nonexistant';
|
$new_env{'ENV'} = '/nonexistant';
|
||||||
|
|
||||||
if (($os eq 'VMS') || ($Config{perlpath} =~ m/$Config{_exe}$/i)) {
|
if (($os eq 'VMS') || ($Config{perlpath} =~ m/$Config{_exe}$/i)) {
|
||||||
$new_env{'__perlname'} = $Config{perlpath};
|
$new_env{'__perlname'} = $Config{perlpath};
|
||||||
} else {
|
} else {
|
||||||
$new_env{'__perlname'} = $Config{perlpath} . $Config{_exe};
|
$new_env{'__perlname'} = $Config{perlpath} . $Config{_exe};
|
||||||
}
|
}
|
||||||
|
$new_env{'__perlname'} = $^X if ($new_env{'__perlname'} eq '') and -f $^X and -x $^X;
|
||||||
|
if ($new_env{'__perlname'} eq '') {
|
||||||
|
foreach $pathelt (split /:/,$ENV{'PATH'}) {
|
||||||
|
chomp($pathelt = `pwd`) if $pathelt eq '';
|
||||||
|
my $x = $pathelt . '/' . $^X;
|
||||||
|
next unless -f $x and -x $x;
|
||||||
|
$new_env{'__perlname'} = $x;
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$new_env{'__perlname'} = $^X if ($new_env{'__perlname'} eq '');
|
||||||
|
|
||||||
if (defined $opt_e) {
|
if (defined $opt_e) {
|
||||||
# XXX need a way to allow many -e arguments...
|
# XXX need a way to allow many -e arguments...
|
||||||
if ($opt_e =~ /^([a-zA-Z_]\w*)(|=(.*))$/) {
|
if ($opt_e =~ /^([a-zA-Z_]\w*)(|=(.*))$/) {
|
||||||
|
4
check.t
4
check.t
@ -1,4 +1,4 @@
|
|||||||
# $MirOS: src/bin/mksh/check.t,v 1.790 2017/05/05 19:43:50 tg Exp $
|
# $MirOS: src/bin/mksh/check.t,v 1.791 2017/05/05 21:17:31 tg Exp $
|
||||||
# -*- mode: sh -*-
|
# -*- mode: sh -*-
|
||||||
#-
|
#-
|
||||||
# Copyright © 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
# Copyright © 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||||
@ -8457,7 +8457,7 @@ description:
|
|||||||
note: Ultrix perl5 t4 returns 65280 (exit-code 255) and no text
|
note: Ultrix perl5 t4 returns 65280 (exit-code 255) and no text
|
||||||
XXX fails when LD_PRELOAD is set with -e and Perl chokes it (ASan)
|
XXX fails when LD_PRELOAD is set with -e and Perl chokes it (ASan)
|
||||||
need-pass: no
|
need-pass: no
|
||||||
category: !os:cygwin,!os:msys,!os:ultrix,!os:uwin-nt,!smksh,!shell:ebcdic-yes
|
category: !os:cygwin,!os:msys,!os:ultrix,!os:uwin-nt,!smksh
|
||||||
env-setup: !FOO=BAR!
|
env-setup: !FOO=BAR!
|
||||||
stdin:
|
stdin:
|
||||||
print '#!'"$__progname"'\nprint "1 a=$ENV{FOO}";' >t1
|
print '#!'"$__progname"'\nprint "1 a=$ENV{FOO}";' >t1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user