From 549e4e7995a90964e92f22af6229d92c1283693b Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Thu, 5 Aug 2021 14:32:53 -0400 Subject: [PATCH] Align with upstream on 'close STDOUT' lines. When upstreaming c1d8c5b0e0ff4177ec06eed58ebcfd5a75b7f231 as https://github.com/openssl/openssl/pull/10883 and then https://github.com/openssl/openssl/pull/10930, we ended up diverging slightly: in the upstream version, I ended up applying the same change to the xlate files. Upstream also suggested "error closing STDOUT: $!". Apply the same changes here. Change-Id: I8a8cbc3944432e94a8844f9f628a900edfe77b30 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/48725 Reviewed-by: Adam Langley --- crypto/chacha/asm/chacha-armv4.pl | 2 +- crypto/chacha/asm/chacha-armv8.pl | 2 +- crypto/chacha/asm/chacha-x86.pl | 2 +- crypto/chacha/asm/chacha-x86_64.pl | 2 +- crypto/cipher_extra/asm/aes128gcmsiv-x86_64.pl | 2 +- crypto/cipher_extra/asm/chacha20_poly1305_x86_64.pl | 2 +- crypto/fipsmodule/aes/asm/aesni-x86.pl | 2 +- crypto/fipsmodule/aes/asm/aesni-x86_64.pl | 2 +- crypto/fipsmodule/aes/asm/aesp8-ppc.pl | 2 +- crypto/fipsmodule/aes/asm/aesv8-armx.pl | 2 +- crypto/fipsmodule/aes/asm/bsaes-armv7.pl | 2 +- crypto/fipsmodule/aes/asm/vpaes-armv7.pl | 2 +- crypto/fipsmodule/aes/asm/vpaes-armv8.pl | 2 +- crypto/fipsmodule/aes/asm/vpaes-x86.pl | 2 +- crypto/fipsmodule/aes/asm/vpaes-x86_64.pl | 2 +- crypto/fipsmodule/bn/asm/armv4-mont.pl | 2 +- crypto/fipsmodule/bn/asm/armv8-mont.pl | 2 +- crypto/fipsmodule/bn/asm/bn-586.pl | 2 +- crypto/fipsmodule/bn/asm/co-586.pl | 2 +- crypto/fipsmodule/bn/asm/rsaz-avx2.pl | 2 +- crypto/fipsmodule/bn/asm/x86-mont.pl | 2 +- crypto/fipsmodule/bn/asm/x86_64-mont.pl | 2 +- crypto/fipsmodule/bn/asm/x86_64-mont5.pl | 2 +- crypto/fipsmodule/ec/asm/p256-x86_64-asm.pl | 2 +- crypto/fipsmodule/ec/asm/p256_beeu-x86_64-asm.pl | 2 +- crypto/fipsmodule/md5/asm/md5-586.pl | 2 +- crypto/fipsmodule/md5/asm/md5-x86_64.pl | 2 +- crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl | 2 +- crypto/fipsmodule/modes/asm/ghash-armv4.pl | 2 +- crypto/fipsmodule/modes/asm/ghash-neon-armv8.pl | 2 +- crypto/fipsmodule/modes/asm/ghash-ssse3-x86.pl | 2 +- crypto/fipsmodule/modes/asm/ghash-ssse3-x86_64.pl | 2 +- crypto/fipsmodule/modes/asm/ghash-x86.pl | 2 +- crypto/fipsmodule/modes/asm/ghash-x86_64.pl | 2 +- crypto/fipsmodule/modes/asm/ghashp8-ppc.pl | 2 +- crypto/fipsmodule/modes/asm/ghashv8-armx.pl | 2 +- crypto/fipsmodule/rand/asm/rdrand-x86_64.pl | 2 +- crypto/fipsmodule/sha/asm/sha1-586.pl | 2 +- crypto/fipsmodule/sha/asm/sha1-armv4-large.pl | 2 +- crypto/fipsmodule/sha/asm/sha1-armv8.pl | 2 +- crypto/fipsmodule/sha/asm/sha1-x86_64.pl | 2 +- crypto/fipsmodule/sha/asm/sha256-586.pl | 2 +- crypto/fipsmodule/sha/asm/sha256-armv4.pl | 2 +- crypto/fipsmodule/sha/asm/sha512-586.pl | 2 +- crypto/fipsmodule/sha/asm/sha512-armv4.pl | 2 +- crypto/fipsmodule/sha/asm/sha512-armv8.pl | 2 +- crypto/fipsmodule/sha/asm/sha512-x86_64.pl | 2 +- crypto/perlasm/arm-xlate.pl | 2 +- crypto/perlasm/ppc-xlate.pl | 2 +- crypto/perlasm/x86_64-xlate.pl | 2 +- crypto/test/asm/trampoline-armv4.pl | 2 +- crypto/test/asm/trampoline-armv8.pl | 2 +- crypto/test/asm/trampoline-ppc.pl | 2 +- crypto/test/asm/trampoline-x86.pl | 2 +- crypto/test/asm/trampoline-x86_64.pl | 2 +- 55 files changed, 55 insertions(+), 55 deletions(-) diff --git a/crypto/chacha/asm/chacha-armv4.pl b/crypto/chacha/asm/chacha-armv4.pl index 5455b83aa..5c78a9fc7 100755 --- a/crypto/chacha/asm/chacha-armv4.pl +++ b/crypto/chacha/asm/chacha-armv4.pl @@ -1163,4 +1163,4 @@ foreach (split("\n",$code)) { print $_,"\n"; } -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/chacha/asm/chacha-armv8.pl b/crypto/chacha/asm/chacha-armv8.pl index b2d3d86d1..608db6675 100755 --- a/crypto/chacha/asm/chacha-armv8.pl +++ b/crypto/chacha/asm/chacha-armv8.pl @@ -1141,4 +1141,4 @@ foreach (split("\n",$code)) { print $_,"\n"; } -close STDOUT or die "error closing STDOUT"; # flush +close STDOUT or die "error closing STDOUT: $!"; # flush diff --git a/crypto/chacha/asm/chacha-x86.pl b/crypto/chacha/asm/chacha-x86.pl index ec1cf8005..482d53f3d 100755 --- a/crypto/chacha/asm/chacha-x86.pl +++ b/crypto/chacha/asm/chacha-x86.pl @@ -769,4 +769,4 @@ sub SSSE3ROUND { # critical path is 20 "SIMD ticks" per round &asm_finish(); -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/chacha/asm/chacha-x86_64.pl b/crypto/chacha/asm/chacha-x86_64.pl index 2ee22b680..8f3f4cee7 100755 --- a/crypto/chacha/asm/chacha-x86_64.pl +++ b/crypto/chacha/asm/chacha-x86_64.pl @@ -2782,4 +2782,4 @@ foreach (split("\n",$code)) { print $_,"\n"; } -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/cipher_extra/asm/aes128gcmsiv-x86_64.pl b/crypto/cipher_extra/asm/aes128gcmsiv-x86_64.pl index 54f0b5cb0..aad31ab7a 100644 --- a/crypto/cipher_extra/asm/aes128gcmsiv-x86_64.pl +++ b/crypto/cipher_extra/asm/aes128gcmsiv-x86_64.pl @@ -2253,4 +2253,4 @@ aes256gcmsiv_kdf(); print $code; -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/cipher_extra/asm/chacha20_poly1305_x86_64.pl b/crypto/cipher_extra/asm/chacha20_poly1305_x86_64.pl index aa42c6759..b2067c78d 100644 --- a/crypto/cipher_extra/asm/chacha20_poly1305_x86_64.pl +++ b/crypto/cipher_extra/asm/chacha20_poly1305_x86_64.pl @@ -2559,4 +2559,4 @@ $code =~ s/\`([^\`]*)\`/eval $1/gem; print $code; -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/aes/asm/aesni-x86.pl b/crypto/fipsmodule/aes/asm/aesni-x86.pl index b999e5a43..7d97adc43 100644 --- a/crypto/fipsmodule/aes/asm/aesni-x86.pl +++ b/crypto/fipsmodule/aes/asm/aesni-x86.pl @@ -2551,4 +2551,4 @@ if ($PREFIX eq $AESNI_PREFIX) { &asm_finish(); -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/aes/asm/aesni-x86_64.pl b/crypto/fipsmodule/aes/asm/aesni-x86_64.pl index f4d2ea51e..2abc8d03b 100644 --- a/crypto/fipsmodule/aes/asm/aesni-x86_64.pl +++ b/crypto/fipsmodule/aes/asm/aesni-x86_64.pl @@ -5102,4 +5102,4 @@ $code =~ s/\bmovbe\s+%eax,\s*([0-9]+)\(%rsp\)/movbe($1)/gem; print $code; -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/aes/asm/aesp8-ppc.pl b/crypto/fipsmodule/aes/asm/aesp8-ppc.pl index 3b1fbee6f..983cbbe6d 100644 --- a/crypto/fipsmodule/aes/asm/aesp8-ppc.pl +++ b/crypto/fipsmodule/aes/asm/aesp8-ppc.pl @@ -3804,4 +3804,4 @@ foreach(split("\n",$code)) { print $_,"\n"; } -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/aes/asm/aesv8-armx.pl b/crypto/fipsmodule/aes/asm/aesv8-armx.pl index 3bfdd8d34..82022c771 100644 --- a/crypto/fipsmodule/aes/asm/aesv8-armx.pl +++ b/crypto/fipsmodule/aes/asm/aesv8-armx.pl @@ -1044,4 +1044,4 @@ if ($flavour =~ /64/) { ######## 64-bit code } } -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/aes/asm/bsaes-armv7.pl b/crypto/fipsmodule/aes/asm/bsaes-armv7.pl index f6db486a6..c537730f1 100644 --- a/crypto/fipsmodule/aes/asm/bsaes-armv7.pl +++ b/crypto/fipsmodule/aes/asm/bsaes-armv7.pl @@ -2433,4 +2433,4 @@ close SELF; print $code; -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/aes/asm/vpaes-armv7.pl b/crypto/fipsmodule/aes/asm/vpaes-armv7.pl index bb77d1047..b4f2eb362 100644 --- a/crypto/fipsmodule/aes/asm/vpaes-armv7.pl +++ b/crypto/fipsmodule/aes/asm/vpaes-armv7.pl @@ -1373,4 +1373,4 @@ foreach (split("\n",$code)) { print $_,"\n"; } -close STDOUT; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/aes/asm/vpaes-armv8.pl b/crypto/fipsmodule/aes/asm/vpaes-armv8.pl index a1d919d2e..8b01fed87 100755 --- a/crypto/fipsmodule/aes/asm/vpaes-armv8.pl +++ b/crypto/fipsmodule/aes/asm/vpaes-armv8.pl @@ -1382,4 +1382,4 @@ ___ print $code; -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/aes/asm/vpaes-x86.pl b/crypto/fipsmodule/aes/asm/vpaes-x86.pl index 14a31058e..04c407d75 100644 --- a/crypto/fipsmodule/aes/asm/vpaes-x86.pl +++ b/crypto/fipsmodule/aes/asm/vpaes-x86.pl @@ -920,4 +920,4 @@ $k_dsbo=0x2c0; # decryption sbox final output &asm_finish(); -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/aes/asm/vpaes-x86_64.pl b/crypto/fipsmodule/aes/asm/vpaes-x86_64.pl index e761eb2d2..f6f67eaa9 100644 --- a/crypto/fipsmodule/aes/asm/vpaes-x86_64.pl +++ b/crypto/fipsmodule/aes/asm/vpaes-x86_64.pl @@ -1546,4 +1546,4 @@ $code =~ s/\`([^\`]*)\`/eval($1)/gem; print $code; -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/bn/asm/armv4-mont.pl b/crypto/fipsmodule/bn/asm/armv4-mont.pl index 5ee474fb4..207b8e4c3 100644 --- a/crypto/fipsmodule/bn/asm/armv4-mont.pl +++ b/crypto/fipsmodule/bn/asm/armv4-mont.pl @@ -761,4 +761,4 @@ foreach (split("\n",$code)) { print $_,"\n"; } -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/bn/asm/armv8-mont.pl b/crypto/fipsmodule/bn/asm/armv8-mont.pl index 77b437df0..aa65ffde9 100644 --- a/crypto/fipsmodule/bn/asm/armv8-mont.pl +++ b/crypto/fipsmodule/bn/asm/armv8-mont.pl @@ -1520,4 +1520,4 @@ ___ print $code; -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/bn/asm/bn-586.pl b/crypto/fipsmodule/bn/asm/bn-586.pl index 5c52e0520..c23d6a929 100644 --- a/crypto/fipsmodule/bn/asm/bn-586.pl +++ b/crypto/fipsmodule/bn/asm/bn-586.pl @@ -30,7 +30,7 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); } &asm_finish(); -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; sub bn_mul_add_words { diff --git a/crypto/fipsmodule/bn/asm/co-586.pl b/crypto/fipsmodule/bn/asm/co-586.pl index abe328add..458db33aa 100644 --- a/crypto/fipsmodule/bn/asm/co-586.pl +++ b/crypto/fipsmodule/bn/asm/co-586.pl @@ -22,7 +22,7 @@ open STDOUT,">$output"; &asm_finish(); -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; sub mul_add_c { diff --git a/crypto/fipsmodule/bn/asm/rsaz-avx2.pl b/crypto/fipsmodule/bn/asm/rsaz-avx2.pl index a0da23906..65b0062a7 100755 --- a/crypto/fipsmodule/bn/asm/rsaz-avx2.pl +++ b/crypto/fipsmodule/bn/asm/rsaz-avx2.pl @@ -1940,4 +1940,4 @@ rsaz_1024_gather5_avx2: ___ }}} -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/bn/asm/x86-mont.pl b/crypto/fipsmodule/bn/asm/x86-mont.pl index 1f61ae55d..58b28ade8 100755 --- a/crypto/fipsmodule/bn/asm/x86-mont.pl +++ b/crypto/fipsmodule/bn/asm/x86-mont.pl @@ -628,4 +628,4 @@ $sbit=$num; &asm_finish(); -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/bn/asm/x86_64-mont.pl b/crypto/fipsmodule/bn/asm/x86_64-mont.pl index 0a9e4d162..8b34ae384 100755 --- a/crypto/fipsmodule/bn/asm/x86_64-mont.pl +++ b/crypto/fipsmodule/bn/asm/x86_64-mont.pl @@ -1578,4 +1578,4 @@ ___ } print $code; -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/bn/asm/x86_64-mont5.pl b/crypto/fipsmodule/bn/asm/x86_64-mont5.pl index b2ff1149e..54335cc9a 100755 --- a/crypto/fipsmodule/bn/asm/x86_64-mont5.pl +++ b/crypto/fipsmodule/bn/asm/x86_64-mont5.pl @@ -3930,4 +3930,4 @@ ___ $code =~ s/\`([^\`]*)\`/eval($1)/gem; print $code; -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/ec/asm/p256-x86_64-asm.pl b/crypto/fipsmodule/ec/asm/p256-x86_64-asm.pl index 994cb82d5..c75d7845a 100755 --- a/crypto/fipsmodule/ec/asm/p256-x86_64-asm.pl +++ b/crypto/fipsmodule/ec/asm/p256-x86_64-asm.pl @@ -4153,4 +4153,4 @@ ___ $code =~ s/\`([^\`]*)\`/eval $1/gem; print $code; -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/ec/asm/p256_beeu-x86_64-asm.pl b/crypto/fipsmodule/ec/asm/p256_beeu-x86_64-asm.pl index c05abba80..b9ec96da8 100644 --- a/crypto/fipsmodule/ec/asm/p256_beeu-x86_64-asm.pl +++ b/crypto/fipsmodule/ec/asm/p256_beeu-x86_64-asm.pl @@ -400,4 +400,4 @@ beeu_mod_inverse_vartime: ___ print $code; -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/md5/asm/md5-586.pl b/crypto/fipsmodule/md5/asm/md5-586.pl index 20c226bc2..ec34aad3a 100644 --- a/crypto/fipsmodule/md5/asm/md5-586.pl +++ b/crypto/fipsmodule/md5/asm/md5-586.pl @@ -36,7 +36,7 @@ $X="esi"; &md5_block("md5_block_asm_data_order"); &asm_finish(); -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; sub Np { diff --git a/crypto/fipsmodule/md5/asm/md5-x86_64.pl b/crypto/fipsmodule/md5/asm/md5-x86_64.pl index 509bcdead..4c96bbaaf 100644 --- a/crypto/fipsmodule/md5/asm/md5-x86_64.pl +++ b/crypto/fipsmodule/md5/asm/md5-x86_64.pl @@ -380,4 +380,4 @@ ___ print $code; -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl b/crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl index 48a556087..793f34c51 100644 --- a/crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl +++ b/crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl @@ -1141,4 +1141,4 @@ $code =~ s/\`([^\`]*)\`/eval($1)/gem; print $code; -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/modes/asm/ghash-armv4.pl b/crypto/fipsmodule/modes/asm/ghash-armv4.pl index d570990ab..e84063bc1 100644 --- a/crypto/fipsmodule/modes/asm/ghash-armv4.pl +++ b/crypto/fipsmodule/modes/asm/ghash-armv4.pl @@ -297,4 +297,4 @@ foreach (split("\n",$code)) { print $_,"\n"; } -close STDOUT or die "error closing STDOUT"; # enforce flush +close STDOUT or die "error closing STDOUT: $!"; # enforce flush diff --git a/crypto/fipsmodule/modes/asm/ghash-neon-armv8.pl b/crypto/fipsmodule/modes/asm/ghash-neon-armv8.pl index b1725a8b2..c6a7af6f5 100644 --- a/crypto/fipsmodule/modes/asm/ghash-neon-armv8.pl +++ b/crypto/fipsmodule/modes/asm/ghash-neon-armv8.pl @@ -291,4 +291,4 @@ foreach (split("\n",$code)) { print $_,"\n"; } -close STDOUT or die "error closing STDOUT"; # enforce flush +close STDOUT or die "error closing STDOUT: $!"; # enforce flush diff --git a/crypto/fipsmodule/modes/asm/ghash-ssse3-x86.pl b/crypto/fipsmodule/modes/asm/ghash-ssse3-x86.pl index 45e1ee1c7..638287699 100644 --- a/crypto/fipsmodule/modes/asm/ghash-ssse3-x86.pl +++ b/crypto/fipsmodule/modes/asm/ghash-ssse3-x86.pl @@ -285,4 +285,4 @@ ____ &asm_finish(); -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/modes/asm/ghash-ssse3-x86_64.pl b/crypto/fipsmodule/modes/asm/ghash-ssse3-x86_64.pl index e0e501055..f73647397 100644 --- a/crypto/fipsmodule/modes/asm/ghash-ssse3-x86_64.pl +++ b/crypto/fipsmodule/modes/asm/ghash-ssse3-x86_64.pl @@ -410,4 +410,4 @@ ____ } print $code; -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/modes/asm/ghash-x86.pl b/crypto/fipsmodule/modes/asm/ghash-x86.pl index 9486c2ea7..f893b50c2 100644 --- a/crypto/fipsmodule/modes/asm/ghash-x86.pl +++ b/crypto/fipsmodule/modes/asm/ghash-x86.pl @@ -660,7 +660,7 @@ my ($Xhi,$Xi)=@_; &asciz("GHASH for x86, CRYPTOGAMS by "); &asm_finish(); -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; # A question was risen about choice of vanilla MMX. Or rather why wasn't # SSE2 chosen instead? In addition to the fact that MMX runs on legacy diff --git a/crypto/fipsmodule/modes/asm/ghash-x86_64.pl b/crypto/fipsmodule/modes/asm/ghash-x86_64.pl index 16f7f00b0..1aeb7b7d2 100644 --- a/crypto/fipsmodule/modes/asm/ghash-x86_64.pl +++ b/crypto/fipsmodule/modes/asm/ghash-x86_64.pl @@ -1336,4 +1336,4 @@ $code =~ s/\`([^\`]*)\`/eval($1)/gem; print $code; -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/modes/asm/ghashp8-ppc.pl b/crypto/fipsmodule/modes/asm/ghashp8-ppc.pl index 827ddb2e4..e9ca11a88 100644 --- a/crypto/fipsmodule/modes/asm/ghashp8-ppc.pl +++ b/crypto/fipsmodule/modes/asm/ghashp8-ppc.pl @@ -667,4 +667,4 @@ foreach (split("\n",$code)) { print $_,"\n"; } -close STDOUT or die "error closing STDOUT"; # enforce flush +close STDOUT or die "error closing STDOUT: $!"; # enforce flush diff --git a/crypto/fipsmodule/modes/asm/ghashv8-armx.pl b/crypto/fipsmodule/modes/asm/ghashv8-armx.pl index 0fb641408..18b87a27a 100644 --- a/crypto/fipsmodule/modes/asm/ghashv8-armx.pl +++ b/crypto/fipsmodule/modes/asm/ghashv8-armx.pl @@ -428,4 +428,4 @@ if ($flavour =~ /64/) { ######## 64-bit code } } -close STDOUT or die "error closing STDOUT"; # enforce flush +close STDOUT or die "error closing STDOUT: $!"; # enforce flush diff --git a/crypto/fipsmodule/rand/asm/rdrand-x86_64.pl b/crypto/fipsmodule/rand/asm/rdrand-x86_64.pl index e5ff10663..ac442a95b 100644 --- a/crypto/fipsmodule/rand/asm/rdrand-x86_64.pl +++ b/crypto/fipsmodule/rand/asm/rdrand-x86_64.pl @@ -84,4 +84,4 @@ CRYPTO_rdrand_multiple8_buf: .size CRYPTO_rdrand_multiple8_buf,.-CRYPTO_rdrand_multiple8_buf ___ -close STDOUT or die "error closing STDOUT"; # flush +close STDOUT or die "error closing STDOUT: $!"; # flush diff --git a/crypto/fipsmodule/sha/asm/sha1-586.pl b/crypto/fipsmodule/sha/asm/sha1-586.pl index bf4296146..90c236108 100644 --- a/crypto/fipsmodule/sha/asm/sha1-586.pl +++ b/crypto/fipsmodule/sha/asm/sha1-586.pl @@ -1483,4 +1483,4 @@ sub Xtail_avx() &asm_finish(); -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/sha/asm/sha1-armv4-large.pl b/crypto/fipsmodule/sha/asm/sha1-armv4-large.pl index f11280afe..2998b8971 100644 --- a/crypto/fipsmodule/sha/asm/sha1-armv4-large.pl +++ b/crypto/fipsmodule/sha/asm/sha1-armv4-large.pl @@ -742,4 +742,4 @@ foreach (split($/,$code)) { print $_,$/; } -close STDOUT or die "error closing STDOUT"; # enforce flush +close STDOUT or die "error closing STDOUT: $!"; # enforce flush diff --git a/crypto/fipsmodule/sha/asm/sha1-armv8.pl b/crypto/fipsmodule/sha/asm/sha1-armv8.pl index 51e326d23..25e523460 100644 --- a/crypto/fipsmodule/sha/asm/sha1-armv8.pl +++ b/crypto/fipsmodule/sha/asm/sha1-armv8.pl @@ -359,4 +359,4 @@ foreach(split("\n",$code)) { print $_,"\n"; } -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/sha/asm/sha1-x86_64.pl b/crypto/fipsmodule/sha/asm/sha1-x86_64.pl index 76e40770d..512602535 100755 --- a/crypto/fipsmodule/sha/asm/sha1-x86_64.pl +++ b/crypto/fipsmodule/sha/asm/sha1-x86_64.pl @@ -2114,4 +2114,4 @@ foreach (split("\n",$code)) { print $_,"\n"; } -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/sha/asm/sha256-586.pl b/crypto/fipsmodule/sha/asm/sha256-586.pl index 240a604a0..99b4cf195 100644 --- a/crypto/fipsmodule/sha/asm/sha256-586.pl +++ b/crypto/fipsmodule/sha/asm/sha256-586.pl @@ -1287,4 +1287,4 @@ sub bodyx_00_15 () { # +10% &asm_finish(); -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/sha/asm/sha256-armv4.pl b/crypto/fipsmodule/sha/asm/sha256-armv4.pl index a2eccf829..0f459e06b 100644 --- a/crypto/fipsmodule/sha/asm/sha256-armv4.pl +++ b/crypto/fipsmodule/sha/asm/sha256-armv4.pl @@ -737,4 +737,4 @@ foreach (split($/,$code)) { print $_,"\n"; } -close STDOUT or die "error closing STDOUT"; # enforce flush +close STDOUT or die "error closing STDOUT: $!"; # enforce flush diff --git a/crypto/fipsmodule/sha/asm/sha512-586.pl b/crypto/fipsmodule/sha/asm/sha512-586.pl index 01acf6799..1aee14d18 100644 --- a/crypto/fipsmodule/sha/asm/sha512-586.pl +++ b/crypto/fipsmodule/sha/asm/sha512-586.pl @@ -922,4 +922,4 @@ sub BODY_00_15_ssse3 { # "phase-less" copy of BODY_00_15_sse2 &asm_finish(); -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/sha/asm/sha512-armv4.pl b/crypto/fipsmodule/sha/asm/sha512-armv4.pl index e15b1d982..185635fcd 100644 --- a/crypto/fipsmodule/sha/asm/sha512-armv4.pl +++ b/crypto/fipsmodule/sha/asm/sha512-armv4.pl @@ -672,4 +672,4 @@ while() { close SELF; print $code; -close STDOUT or die "error closing STDOUT"; # enforce flush +close STDOUT or die "error closing STDOUT: $!"; # enforce flush diff --git a/crypto/fipsmodule/sha/asm/sha512-armv8.pl b/crypto/fipsmodule/sha/asm/sha512-armv8.pl index 2971b745a..ae803a9ac 100644 --- a/crypto/fipsmodule/sha/asm/sha512-armv8.pl +++ b/crypto/fipsmodule/sha/asm/sha512-armv8.pl @@ -459,4 +459,4 @@ foreach(split("\n",$code)) { print $_,"\n"; } -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/fipsmodule/sha/asm/sha512-x86_64.pl b/crypto/fipsmodule/sha/asm/sha512-x86_64.pl index 8c5a5f331..61f67cb60 100755 --- a/crypto/fipsmodule/sha/asm/sha512-x86_64.pl +++ b/crypto/fipsmodule/sha/asm/sha512-x86_64.pl @@ -2082,4 +2082,4 @@ foreach (split("\n",$code)) { print $_,"\n"; } -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/perlasm/arm-xlate.pl b/crypto/perlasm/arm-xlate.pl index 576f682e0..c000e020a 100755 --- a/crypto/perlasm/arm-xlate.pl +++ b/crypto/perlasm/arm-xlate.pl @@ -245,4 +245,4 @@ print "#endif // !OPENSSL_NO_ASM\n"; # See https://www.airs.com/blog/archives/518. print ".section\t.note.GNU-stack,\"\",\%progbits\n" if ($flavour =~ /linux/); -close STDOUT; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/perlasm/ppc-xlate.pl b/crypto/perlasm/ppc-xlate.pl index 4f22c36dc..d62ae0106 100644 --- a/crypto/perlasm/ppc-xlate.pl +++ b/crypto/perlasm/ppc-xlate.pl @@ -314,4 +314,4 @@ print "#endif // !OPENSSL_NO_ASM && __powerpc64__\n"; # See https://www.airs.com/blog/archives/518. print ".section\t.note.GNU-stack,\"\",\@progbits\n" if ($flavour =~ /linux/); -close STDOUT; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/perlasm/x86_64-xlate.pl b/crypto/perlasm/x86_64-xlate.pl index 4a41a2413..04abd0b44 100755 --- a/crypto/perlasm/x86_64-xlate.pl +++ b/crypto/perlasm/x86_64-xlate.pl @@ -1264,7 +1264,7 @@ print "#endif\n" if ($gas); # See https://www.airs.com/blog/archives/518. print ".section\t.note.GNU-stack,\"\",\@progbits\n" if ($elf); -close STDOUT; +close STDOUT or die "error closing STDOUT: $!"; ################################################# # Cross-reference x86_64 ABI "card" diff --git a/crypto/test/asm/trampoline-armv4.pl b/crypto/test/asm/trampoline-armv4.pl index 4a61f61c1..d2f5da7fb 100755 --- a/crypto/test/asm/trampoline-armv4.pl +++ b/crypto/test/asm/trampoline-armv4.pl @@ -178,4 +178,4 @@ ____ } print $code; -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/test/asm/trampoline-armv8.pl b/crypto/test/asm/trampoline-armv8.pl index 426360ee7..76cc0252b 100755 --- a/crypto/test/asm/trampoline-armv8.pl +++ b/crypto/test/asm/trampoline-armv8.pl @@ -213,4 +213,4 @@ ____ } print $code; -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/test/asm/trampoline-ppc.pl b/crypto/test/asm/trampoline-ppc.pl index a8d7c3f00..b29c3612d 100755 --- a/crypto/test/asm/trampoline-ppc.pl +++ b/crypto/test/asm/trampoline-ppc.pl @@ -259,4 +259,4 @@ abi_test_clobber_lr: ____ print $code; -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/test/asm/trampoline-x86.pl b/crypto/test/asm/trampoline-x86.pl index 4244ac2aa..9694d16b0 100755 --- a/crypto/test/asm/trampoline-x86.pl +++ b/crypto/test/asm/trampoline-x86.pl @@ -120,4 +120,4 @@ foreach (0..7) { &asm_finish(); -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!"; diff --git a/crypto/test/asm/trampoline-x86_64.pl b/crypto/test/asm/trampoline-x86_64.pl index 5196141c8..f6d838507 100755 --- a/crypto/test/asm/trampoline-x86_64.pl +++ b/crypto/test/asm/trampoline-x86_64.pl @@ -556,4 +556,4 @@ ____ } print $code; -close STDOUT or die "error closing STDOUT"; +close STDOUT or die "error closing STDOUT: $!";