X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;f=Configure;h=3ba5726f9314bfb310ed33eb3eca88114c665fae;hb=7ae01d4adc752241cbf49db74d2510d30fc2d923;hp=300a3ac8026a3e818fc5dd93594ae9523e60a1c6;hpb=1641cb6043723a072997100027d6f1ef6c588519;p=openssl.git diff --git a/Configure b/Configure index 300a3ac802..3ba5726f93 100755 --- a/Configure +++ b/Configure @@ -1,6 +1,8 @@ #!/usr/local/bin/perl -w +require 5.000; use strict; +use POSIX qw(:errno_h); # # see PROBLEMS for instructions on what sort of things to do when @@ -198,9 +200,8 @@ my %table=( # Windows NT, Microsoft Visual C++ 4.0 -# hmm... bug in perl under NT, I need to concatinate :-( -"VC-NT","cl:::BN_LLONG RC4_INDEX ".$x86_gcc_opts.":::", -"VC-WIN32","cl:::BN_LLONG RC4_INDEX ".$x86_gcc_opts.":::", +"VC-NT","cl:::BN_LLONG RC4_INDEX ${x86_gcc_opts}:::", +"VC-WIN32","cl:::BN_LLONG RC4_INDEX ${x86_gcc_opts}:::", "VC-WIN16","cl:::MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX THIRTY_TWO_BIT:::", "VC-W31-16","cl:::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT:::", "VC-W31-32","cl:::MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX THIRTY_TWO_BIT:::", @@ -268,7 +269,7 @@ foreach (@ARGV) } else { - die "unknown options, only -Dxxx, -Lxxx -lxxx supported\n"; + die "unknown options, only -Dxxx, -Lxxx and -lxxx supported\n"; } } else @@ -326,9 +327,8 @@ if ($rmd160_obj =~ /\.o$/) $cflags.=" -DRMD160_ASM"; } -my $n=&file_new($Makefile); -open(IN,"<".$Makefile) || die "unable to read $Makefile:$!\n"; -open(OUT,">".$n) || die "unable to read $n:$!\n"; +open(IN,'$Makefile") || die "unable to create $Makefile:$!\n"; while () { chop; @@ -349,8 +349,7 @@ while () } close(IN); close(OUT); -&Rename($Makefile,&file_old($Makefile)); -&Rename($n,$Makefile); + print "CC =$cc\n"; print "CFLAG =$cflags\n"; print "EX_LIBS =$lflags\n"; @@ -408,7 +407,7 @@ foreach (sort split(/\s+/,$bn_ops)) } ((my $in=$bn) =~ s/\.([^.]+)/.$postfix/); -$n=&file_new($bn); +my $n=&file_new($bn); open(IN,"<".$in) || die "unable to read $bn:$!\n"; open(OUT,">$n") || die "unable to read $n:$!\n"; while () @@ -599,7 +598,6 @@ sub bad_target my $j=0; foreach my $i (sort keys %table) { - next if /^b-/; print STDERR "\n" if ($j++ % 4) == 0; printf(STDERR "%-18s ",$i); } @@ -611,7 +609,10 @@ sub Rename my($from,$to)=@_; unlink($to); - rename($from,$to) || die "unable to rename $from to $to:$!\n"; + if(!rename($from,$to)) + { + POSIX::errno() == POSIX::ENOENT || die "unable to rename $from to $to:$!\n"; + } } sub file_new { local($a)=@_; $a =~ s/(\.[^.]+$|$)/.new/; $a; }