develooper Front page | perl.perl5.porters | Postings from August 2016

Getting HP-UX smokes green again

Thread Next
From:
H.Merijn Brand
Date:
August 18, 2016 11:36
Subject:
Getting HP-UX smokes green again
Message ID:
20160818133612.51bb6d7d@pc09.procura.nl
When running tests on HP-UX (Itanium), the warning tests show

EXPECTED:
Filehandle STDOUT opened only for output at - line 3.
GOT:
Filehandle STDOUT opened only for output at - line 3.
Unable to flush stdout: Error 0

only when PERLIO = stdio

Getting the smokes green again would require the following change IMHO

https://gist.github.com/Tux/c80fbbd760bf1bf38de1eadff7811836

Is that something I can commit, or are there things I did not see?

--8<---
diff --git a/perl.c b/perl.c
index 21a8b30..ee4752b 100644
--- a/perl.c
+++ b/perl.c
@@ -621,8 +621,9 @@ perl_destruct(pTHXx)
         PerlIO *stdo = PerlIO_stdout();
         if (*stdo && PerlIO_flush(stdo)) {
             PerlIO_restore_errno(stdo);
-            PerlIO_printf(PerlIO_stderr(), "Unable to flush stdout: %s",
-                          Strerror(errno));
+            if (errno)
+                PerlIO_printf(PerlIO_stderr(), "Unable to flush stdout: %s",
+                    Strerror(errno));
             if (!STATUS_UNIX)
                 STATUS_ALL_FAILURE;
         }
-->8---

FWIW the indentation use of tabs and spaces is very inconsistent in
perl.c

-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.25   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About