Coverity fixes
[openssl.git] / Configure
index 2247a36aaa37ca2c4e39eac34e5ad758483e6ead..c216049194291093ac8f3f26ca5ced89aaab4983 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -88,9 +88,6 @@ my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] [-lx
 #               linked openssl executable has rather debugging value than
 #               production quality.
 #
-# DEBUG_SAFESTACK use type-safe stacks to enforce type-safety on stack items
-#               provided to stack calls. Generates unique stack functions for
-#               each possible stack type.
 # BN_LLONG      use the type 'long long' in crypto/bn/bn.h
 # RC4_CHAR      use 'char' instead of 'int' for RC4_INT in crypto/rc4/rc4.h
 # Following are set automatically by this script
@@ -1400,7 +1397,10 @@ if ($target{sys_id} ne "")
 
 unless ($disabled{asm}) {
     $target{cpuid_asm_src}=$table{DEFAULTS}->{cpuid_asm_src} if ($config{processor} eq "386");
-    push @{$config{lib_defines}}, "OPENSSL_CPUID_OBJ" if ($target{cpuid_asm_src} ne "mem_clr.c");
+    if ($target{cpuid_asm_src} ne "mem_clr.c") {
+        push @{$config{lib_defines}}, "OPENSSL_CPUID_OBJ";
+        push @{$config{module_defines}}, "OPENSSL_CPUID_OBJ";
+    }
 
     $target{bn_asm_src} =~ s/\w+-gf2m.c// if (defined($disabled{ec2m}));
 
@@ -1432,15 +1432,30 @@ unless ($disabled{asm}) {
         push @{$config{lib_defines}}, "RMD160_ASM";
     }
     if ($target{aes_asm_src}) {
-        push @{$config{lib_defines}}, "AES_ASM" if ($target{aes_asm_src} =~ m/\baes-/);;
+        if ($target{aes_asm_src} =~ m/\baes-/) {
+            push @{$config{lib_defines}}, "AES_ASM";
+            push @{$config{module_defines}}, "AES_ASM";
+        }
         # aes-ctr.fake is not a real file, only indication that assembler
         # module implements AES_ctr32_encrypt...
-        push @{$config{lib_defines}}, "AES_CTR_ASM" if ($target{aes_asm_src} =~ s/\s*aes-ctr\.fake//);
+        if ($target{aes_asm_src} =~ s/\s*aes-ctr\.fake//) {
+            push @{$config{lib_defines}}, "AES_CTR_ASM";
+            push @{$config{module_defines}}, "AES_CTR_ASM";
+        }
         # aes-xts.fake indicates presence of AES_xts_[en|de]crypt...
-        push @{$config{lib_defines}}, "AES_XTS_ASM" if ($target{aes_asm_src} =~ s/\s*aes-xts\.fake//);
+        if ($target{aes_asm_src} =~ s/\s*aes-xts\.fake//) {
+            push @{$config{lib_defines}}, "AES_XTS_ASM";
+            push @{$config{module_defines}}, "AES_XTS_ASM";
+        }
         $target{aes_asm_src} =~ s/\s*(vpaes|aesni)-x86\.s//g if ($disabled{sse2});
-        push @{$config{lib_defines}}, "VPAES_ASM" if ($target{aes_asm_src} =~ m/vpaes/);
-        push @{$config{lib_defines}}, "BSAES_ASM" if ($target{aes_asm_src} =~ m/bsaes/);
+        if ($target{aes_asm_src} =~ m/vpaes/) {
+            push @{$config{lib_defines}}, "VPAES_ASM";
+            push @{$config{module_defines}}, "VPAES_ASM";
+        }
+        if ($target{aes_asm_src} =~ m/bsaes/) {
+            push @{$config{lib_defines}}, "BSAES_ASM";
+            push @{$config{module_defines}}, "BSAES_ASM";
+        }
     }
     if ($target{wp_asm_src} =~ /mmx/) {
         if ($config{processor} eq "386") {