Perl cleanup: don't create lists unnecessarily
[openssl.git] / Configure
index 62e1b193092805f48a65f80023dbef885c60e04a..ef5ff9f2e7727f0c827d15dfd8bb067059fe5ac2 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -67,9 +67,9 @@ my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] [-lx
 # RC4_CHAR     use 'char' instead of 'int' for RC4_INT in crypto/rc4/rc4.h
 # Following are set automatically by this script
 #
-# MD5_ASM      use some extra md5 assembler,
-# SHA1_ASM     use some extra sha1 assembler, must define L_ENDIAN for x86
-# RMD160_ASM   use some extra ripemd160 assembler,
+# MD5_ASM      use some extra md5 assember,
+# SHA1_ASM     use some extra sha1 assember, must define L_ENDIAN for x86
+# RMD160_ASM   use some extra ripemd160 assember,
 # SHA256_ASM   sha256_block is implemented in assembler
 # SHA512_ASM   sha512_block is implemented in assembler
 # AES_ASM      ASE_[en|de]crypt is implemented in assembler
@@ -77,7 +77,7 @@ my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] [-lx
 # Minimum warning options... any contributions to OpenSSL should at least get
 # past these.
 
-my $gcc_devteam_warn = "-DPEDANTIC -DREF_DEBUG -DDEBUG_UNUSED -DBIO_DEBUG"
+my $gcc_devteam_warn = "-DPEDANTIC -DREF_DEBUG -DDEBUG_UNUSED -DBIO_DEBUG -DBLAKE_DEBUG"
         . " -pedantic"
         . " -Wall"
         . " -Wno-long-long"
@@ -149,7 +149,7 @@ sub read_config;
 
 # resolve_config(target)
 #
-# Resolves all the late evaluations, inheritances and so on for the
+# Resolves all the late evalutations, inheritances and so on for the
 # chosen target and any target it inherits from.
 sub resolve_config;
 
@@ -227,7 +227,7 @@ $config{sdirs} = [
 my @tls = qw(ssl3 tls1 tls1_1 tls1_2);
 my @dtls = qw(dtls1 dtls1_2);
 
-# Explicitly known options that are possible to disable.  They can
+# Explicitelly known options that are possible to disable.  They can
 # be regexps, and will be used like this: /^no-${option}$/
 # For developers: keep it sorted alphabetically
 
@@ -701,7 +701,7 @@ foreach (@argvcopy)
        unless ($_ eq $target || /^no-/ || /^disable-/)
                {
                # "no-..." follows later after implied disactivations
-               # have been derived.  (Don't take this too seriously,
+               # have been derived.  (Don't take this too seroiusly,
                # we really only write OPTIONS to the Makefile out of
                # nostalgia.)
 
@@ -743,9 +743,9 @@ while (@tocheckfor) {
     while (@cascade_copy) {
        my ($test, $descendents) = (shift @cascade_copy, shift @cascade_copy);
        if (ref($test) eq "CODE" ? $test->() : defined($disabled{$test})) {
-           map {
+           foreach(grep { !defined($disabled{$_}) } @$descendents) {
                $new_tocheckfor{$_} = 1; $disabled{$_} = "forced";
-           } grep { !defined($disabled{$_}) } @$descendents;
+           }
        }
     }
     @tocheckfor = (keys %new_tocheckfor);
@@ -972,7 +972,7 @@ unless ($disabled{threads}) {
             $disabled{threads} = "unavailable";
         }
     } else {
-        # The user chose to enable threads explicitly, let's see
+        # The user chose to enable threads explicitely, let's see
         # if there's a chance that's possible
         if ($target{thread_scheme} eq "(unknown)") {
             # If the user asked for "threads" and we don't have internal
@@ -2093,8 +2093,8 @@ sub read_config {
 
 }
 
-# configuration resolver.  Will only resolve all the lazy evaluation
-# codeblocks for the chosen target and all those it inherits from,
+# configuration resolver.  Will only resolve all the lazy evalutation
+# codeblocks for the chozen target and all those it inherits from,
 # recursively
 sub resolve_config {
     my $target = shift;
@@ -2128,12 +2128,12 @@ sub resolve_config {
            # the config that had it.
            delete $inherited_config{template};
 
-           map {
+           foreach (keys %inherited_config) {
                if (!$combined_inheritance{$_}) {
                    $combined_inheritance{$_} = [];
                }
                push @{$combined_inheritance{$_}}, $inherited_config{$_};
-           } keys %inherited_config;
+           }
        }
     }
 
@@ -2147,7 +2147,7 @@ sub resolve_config {
     # - If a value is a coderef, it will be executed with the list of
     #   inherited values as arguments.
     # - If the corresponding key doesn't have a value at all or is the
-    #   empty string, the inherited value list will be run through the
+    #   emoty string, the inherited value list will be run through the
     #   default combiner (below), and the result becomes this target's
     #   value.
     # - Otherwise, this target's value is assumed to be a string that
@@ -2415,7 +2415,7 @@ sub quotify {
     my $processor =
        defined($processors{$for}) ? $processors{$for} : sub { shift; };
 
-    map { $processor->($_); } @_;
+    return map { $processor->($_); } @_;
 }
 
 # collect_from_file($filename, $line_concat_cond_re, $line_concat)