Cleanup libcrypto.num and make update
[openssl.git] / Configure
index 62e1b193092805f48a65f80023dbef885c60e04a..4e0e34298c76d4c413e5cd278f6e19b0f4d6e5e8 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,10 +77,21 @@ 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"
-        . " -pedantic"
+# DEBUG_UNUSED enables __owur (warn unused result) checks.
+my $gcc_devteam_warn = "-DDEBUG_UNUSED"
+        # -DPEDANTIC complements -pedantic and is meant to mask code that
+        # is not strictly standard-compliant and/or implementation-specifc,
+        # e.g. inline assembly, disregards to alignment requirements, such
+        # that -pedantic would complain about. Incidentally -DPEDANTIC has
+        # to be used even in sanitized builds, because sanitizer too is
+        # supposed to and does take notice of non-standard behaviour. Then
+        # -pedantic with pre-C9x compiler would also complain about 'long
+        # long' not being supported. As 64-bit algorithms are common now,
+        # it grew impossible to resolve this without sizeable additional
+        # code, so we just tell compiler to be pedantic about everything
+        # but 'long long' type.
+        . " -DPEDANTIC -pedantic -Wno-long-long"
         . " -Wall"
-        . " -Wno-long-long"
         . " -Wsign-compare"
         . " -Wmissing-prototypes"
         . " -Wshadow"
@@ -149,7 +160,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 +238,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
 
@@ -661,7 +672,7 @@ foreach (@argvcopy)
                        }
                elsif (/^--with-zlib-include=(.*)$/)
                        {
-                       $withargs{zlib_include}="-I$1";
+                       $withargs{zlib_include}=$1;
                        }
                elsif (/^--with-fipslibdir=(.*)$/)
                        {
@@ -701,7 +712,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 +754,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 +983,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 +2104,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 +2139,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 +2158,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 +2426,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)