Fix some issues near recent chomp changes.
[openssl.git] / crypto / perlasm / x86_64-xlate.pl
index 1f5bced8e162e0e35eface009ea414fbdddffbd2..0a023fb82f5b24ab61b1ff05d76688feb28e4bab 100755 (executable)
@@ -80,7 +80,7 @@ my $nasm=0;
 
 if    ($flavour eq "mingw64")  { $gas=1; $elf=0; $win64=1;
                                  $prefix=`echo __USER_LABEL_PREFIX__ | $ENV{CC} -E -P -`;
-                                 chomp($prefix);
+                                 $prefix =~ s|\R$||; # Better chomp
                                }
 elsif ($flavour eq "macosx")   { $gas=1; $elf=0; $prefix="_"; $decor="L\$"; }
 elsif ($flavour eq "masm")     { $gas=0; $elf=0; $masm=$masmref; $win64=1; $decor="\$L\$"; }
@@ -850,9 +850,9 @@ ___
 OPTION DOTNAME
 ___
 }
-while($line=<>) {
+while(defined($line=<>)) {
 
-    chomp($line);
+    $line =~ s|\R$||;           # Better chomp
 
     $line =~ s|[#!].*$||;      # get rid of asm-style comments...
     $line =~ s|/\*.*\*/||;     # ... and C-style comments...