In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/009165e9970c3fcc3a252874e1ed96b1733976ea?hp=64072da0d64f4e24d5d3f53f391a1fb7a5121ac0>

- Log -----------------------------------------------------------------
commit 009165e9970c3fcc3a252874e1ed96b1733976ea
Author: Zefram <[email protected]>
Date:   Fri Dec 1 01:39:57 2017 +0000

    revert changes to st_ino signedness handling
    
    This reverts commits 8843856e9716655549cce789b3338e1d4c72fffb,
    3676f9e77d46b61f4785aad171f02bed29df0c07, and
    793c2ded15ca832d1df1fabbc3b2e7562a057697.
    
    As noted in the large comment above the relevant code, the probed
    ST_INO_SIGN is not reliable enough for its purpose, because Configure
    makes guesses.  The actual compiler knows whether st_ino is signed,
    and is perfectly capable of optimising out the negative-handling code
    in the usual case that st_ino is unsigned, without any need for us to
    preprocess it away.

-----------------------------------------------------------------------

Summary of changes:
 pp_sys.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/pp_sys.c b/pp_sys.c
index 30b373bd3a..7a4c4ab1ef 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3012,13 +3012,14 @@ PP(pp_stat)
             * st_ino; and (d) sprintf() doesn't necessarily support
             * integers as large as st_ino.
             */
+           bool neg;
            Stat_t s;
            CLANG_DIAG_IGNORE(-Wtautological-compare);
            GCC_DIAG_IGNORE(-Wtype-limits);
+           neg = PL_statcache.st_ino < 0;
            GCC_DIAG_RESTORE;
            CLANG_DIAG_RESTORE;
-#if ST_INO_SIGN == -1
-           if (PL_statcache.st_ino < 0) {
+           if (neg) {
                s.st_ino = (IV)PL_statcache.st_ino;
                if (LIKELY(s.st_ino == PL_statcache.st_ino)) {
                    mPUSHi(s.st_ino);
@@ -3036,9 +3037,7 @@ PP(pp_stat)
                    *--p = '-';
                    mPUSHp(p, buf+sizeof(buf) - p);
                }
-           } else
-#endif
-            {
+           } else {
                s.st_ino = (UV)PL_statcache.st_ino;
                if (LIKELY(s.st_ino == PL_statcache.st_ino)) {
                    mPUSHu(s.st_ino);

-- 
Perl5 Master Repository

Reply via email to