summaryrefslogtreecommitdiffstats
path: root/ms
diff options
context:
space:
mode:
Diffstat (limited to 'ms')
-rwxr-xr-xms/uplink-ia64.pl3
-rwxr-xr-xms/uplink-x86.pl3
-rwxr-xr-xms/uplink-x86_64.pl7
3 files changed, 7 insertions, 6 deletions
diff --git a/ms/uplink-ia64.pl b/ms/uplink-ia64.pl
index 7287544079..757e77d29f 100755
--- a/ms/uplink-ia64.pl
+++ b/ms/uplink-ia64.pl
@@ -6,8 +6,7 @@
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
-$output = pop;
-open STDOUT,">$output";
+$output = pop and open STDOUT,">$output";
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
push(@INC,"${dir}.");
diff --git a/ms/uplink-x86.pl b/ms/uplink-x86.pl
index 300ed0d3a8..bad4901802 100755
--- a/ms/uplink-x86.pl
+++ b/ms/uplink-x86.pl
@@ -12,8 +12,7 @@ require "x86asm.pl";
require "uplink-common.pl";
-$output = pop;
-open STDOUT,">$output";
+$output = pop and open STDOUT,">$output";
&asm_init($ARGV[0]);
diff --git a/ms/uplink-x86_64.pl b/ms/uplink-x86_64.pl
index 9efe5ab98b..5564c2c7ba 100755
--- a/ms/uplink-x86_64.pl
+++ b/ms/uplink-x86_64.pl
@@ -6,9 +6,12 @@
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
-$output=pop;
+# $output is the last argument if it looks like a file (it has an extension)
+$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
+
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
-open OUT,"| \"$^X\" \"${dir}../crypto/perlasm/x86_64-xlate.pl\" \"$output\"";
+open OUT,"| \"$^X\" \"${dir}../crypto/perlasm/x86_64-xlate.pl\" \"$output\""
+ or die "can't call ${dir}../crypto/perlasm/x86_64-xlate.pl: $!";
*STDOUT=*OUT;
push(@INC,"${dir}.");