Hi.

   OpenSSL build on Windows, when run using Cygwin perl, incorrectly 
redirects some of its subprocess outputs to 'NUL' thus causing a file 
'NUL' to be created in the file system. Such files then cause 
inconveniences to developers as regular native Windows tools (e.g. 
cmd.exe shell's del command or Windows Explorer shell's delete 
operation) generally fail to operate on such a file.

   Attached is a simple patch fixing this problem so a correct 'NUL' or 
'/dev/null' file name is used for discarding subprocess output based on 
the perl type used.

   The patch has been prepared in unified diff format based on the 
current CVS HEAD.

   I guess matching changes should be ported to specific release 
maintenance branches.

   Hope this helps.

   Best regards,
     Jurko Gospodneti?

Left base folder: D:\Workplace\OpenSSL\HEAD
Right base folder: D:\Workplace\OpenSSL\Patched
--- util\pl\netware.pl  2012-05-08 15:59:19.000000000 +0200
+++ util\pl\netware.pl  2012-05-08 15:51:50.000000000 +0200
@@ -132,5 +132,7 @@
 if ($nw_nasm)
 {
-   $asm=(`nasm -v 2>NUL` gt `nasmw -v 2>NUL`?"nasm":"nasmw");
+   use File::Spec qw( devnull );
+   my $devnull = File::Spec->devnull;
+   $asm=(`nasm -v 2>$devnull` gt `nasmw -v 2>$devnull`?"nasm":"nasmw");
    if ($gnuc)
    {
--- util\pl\VC-32.pl    2012-05-08 15:59:19.000000000 +0200
+++ util\pl\VC-32.pl    2012-05-08 15:51:21.000000000 +0200
@@ -203,6 +203,10 @@
 $shlib_ex_obj="";
 $app_ex_obj="setargv.obj" if ($FLAVOR !~ /CE/);
+
+use File::Spec qw( devnull );
+my $devnull = File::Spec->devnull;
+
 if ($FLAVOR =~ /WIN64A/) {
-       if (`nasm -v 2>NUL` =~ /NASM version ([0-9]+\.[0-9]+)/ && $1 >= 2.0) {
+       if (`nasm -v 2>$devnull` =~ /NASM version ([0-9]+\.[0-9]+)/ && $1 >= 
2.0) {
                $asm='nasm -f win64 -DNEAR -Ox -g';
                $afile='-o ';
@@ -215,6 +219,6 @@
        $afile="-o ";
 } elsif ($nasm) {
-       my $ver=`nasm -v 2>NUL`;
-       my $vew=`nasmw -v 2>NUL`;
+       my $ver=`nasm -v 2>$devnull`;
+       my $vew=`nasmw -v 2>$devnull`;
        # pick newest version
        $asm=($ver ge $vew?"nasm":"nasmw")." -f win32";

Reply via email to