Only use bufferoverflowu.lib when needed
authorDr. Stephen Henson <steve@openssl.org>
Thu, 4 Feb 2010 01:10:24 +0000 (01:10 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 4 Feb 2010 01:10:24 +0000 (01:10 +0000)
util/pl/VC-32.pl

index 09dc26f107bb7f3860066da5b67cd69c23bbc721..ed4a3f92f5d327b5ced7c1127ec11f623adf3e80 100644 (file)
@@ -149,6 +149,18 @@ if ($no_sock)              { $ex_libs=''; }
 elsif ($FLAVOR =~ /CE/)        { $ex_libs='winsock.lib'; }
 else                   { $ex_libs='wsock32.lib'; }
 
+my $oflow;
+
+
+if ($FLAVOR =~ /WIN64/ and `cl 2>&1` =~ /14\.00\.4[0-9]{4}\./)
+       {
+       $oflow=' bufferoverflowu.lib';
+       }
+else
+       {
+       $oflow="";
+       }
+
 if ($FLAVOR =~ /CE/)
        {
        $ex_libs.=' $(WCECOMPAT)/lib/wcecompatex.lib';
@@ -157,7 +169,7 @@ if ($FLAVOR =~ /CE/)
 else
        {
        $ex_libs.=' gdi32.lib crypt32.lib advapi32.lib user32.lib';
-       $ex_libs.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/ and `cl 2>&1` =~ /14\.00\.4[0-9]{4}\./);
+       $ex_libs.= $oflow;
 
        }
 
@@ -343,7 +355,7 @@ sub do_lib_rule
 
                if ($name eq "")
                        {
-                       $ex.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/);
+                       $ex.= $oflow;
                        if ($target =~ /capi/)
                                {
                                $ex.=' crypt32.lib advapi32.lib';
@@ -358,7 +370,7 @@ sub do_lib_rule
                        $ex.=' unicows.lib' if ($FLAVOR =~ /NT/);
                        $ex.=' wsock32.lib gdi32.lib advapi32.lib user32.lib';
                        $ex.=' crypt32.lib';
-                       $ex.=' bufferoverflowu.lib' if ($FLAVOR =~ /WIN64/);
+                       $ex.= $oflow;
                        }
                $ex.=" $zlib_lib" if $zlib_opt == 1 && $target =~ /O_CRYPTO/;