Fix determination of Perl interpreter: A perl or perl5

_directory_ in $PATH was also accepted as the interpreter.
This commit is contained in:
Ralf S. Engelschall 1999-06-10 08:13:52 +00:00
parent 06018c4685
commit 9d9b559ef0
2 changed files with 5 additions and 2 deletions

View File

@ -2,9 +2,12 @@
OpenSSL CHANGES OpenSSL CHANGES
_______________ _______________
Changes between 0.9.3a and 0.9.4 Changes between 0.9.3a and 0.9.4
*) Fix determination of Perl interpreter: A perl or perl5
_directory_ in $PATH was also accepted as the interpreter.
[Ralf S. Engelschall]
*) Fix demos/sign/sign.c: well there wasn't anything strictly speaking *) Fix demos/sign/sign.c: well there wasn't anything strictly speaking
wrong with it but it was very old and did things like calling wrong with it but it was very old and did things like calling
PEM_ASN1_read() directly and used MD5 for the hash not to mention some PEM_ASN1_read() directly and used MD5 for the hash not to mention some

View File

@ -753,7 +753,7 @@ sub which
my $path; my $path;
foreach $path (split /:/, $ENV{PATH}) foreach $path (split /:/, $ENV{PATH})
{ {
if (-x "$path/$name") if (-f "$path/$name" and -x _)
{ {
return "$path/$name" unless ($name eq "perl" and return "$path/$name" unless ($name eq "perl" and
system("$path/$name -e " . '\'exit($]<5.0);\'')); system("$path/$name -e " . '\'exit($]<5.0);\''));