require 5.000;
use strict;
-use POSIX qw(:errno_h);
#
# see PROBLEMS for instructions on what sort of things to do when
(my $cc,my $cflags,my $lflags,my $bn_ops,my $bn_obj,my $des_obj,my $bf_obj,
$md5_obj,$sha1_obj,my $cast_obj,my $rc4_obj,$rmd160_obj,my $rc5_obj)=
- split(/\s*:\s*/,$table{$target});
+ split(/\s*:\s*/,$table{$target} . ":" x 20 , -1);
$cflags="$flags$cflags" if ($flags ne "");
$lflags="$libs$lflags"if ($libs ne "");
}
my ($bn1)=split(/\s+/,$bn_obj);
+$bn1 = "" unless defined $bn1;
$bn1=$bn_asm unless ($bn1 =~ /\.o$/);
$bn_obj="$bn1";
s/^CC=.*$/CC= $cc/;
s/^CFLAG=.*$/CFLAG= $cflags/;
s/^EX_LIBS=.*$/EX_LIBS= $lflags/;
- s/^BN_MULW=.*$/BN_MULW= $bn_obj/;
+ s/^BN_ASM=.*$/BN_ASM= $bn_obj/;
s/^DES_ENC=.*$/DES_ENC= $des_obj/;
s/^BF_ENC=.*$/BF_ENC= $bf_obj/;
s/^CAST_ENC=.*$/CAST_ENC= $cast_obj/;
print "CC =$cc\n";
print "CFLAG =$cflags\n";
print "EX_LIBS =$lflags\n";
-print "BN_MULW =$bn_obj\n";
+print "BN_ASM =$bn_obj\n";
print "DES_ENC =$des_obj\n";
print "BF_ENC =$bf_obj\n";
print "CAST_ENC =$cast_obj\n";
print STDERR "Usage: Configure [-Dxxx] [-Lxxx] [-lxxx] os/compiler\n";
print STDERR "pick os/compiler from:";
my $j=0;
- foreach my $i (sort keys %table)
+ my $i;
+ foreach $i (sort keys %table)
{
print STDERR "\n" if ($j++ % 4) == 0;
printf(STDERR "%-18s ",$i);
sub Rename
{
my($from,$to)=@_;
-
unlink($to);
if(!rename($from,$to))
{
- POSIX::errno() == POSIX::ENOENT || die "unable to rename $from to $to:$!\n";
+ -e $from && die "unable to rename $from to $to:$!\n";
}
}
-sub file_new { local($a)=@_; $a =~ s/(\.[^.]+$|$)/.new/; $a; }
-sub file_old { local($a)=@_; $a =~ s/(\.[^.]+$|$)/.old/; $a; }
+sub file_new { my($a)=@_; $a =~ s/(\.[^.]+$|$)/.new/; $a; }
+sub file_old { my($a)=@_; $a =~ s/(\.[^.]+$|$)/.old/; $a; }