| Store | Cart

Re: S_IFMT()

From: Tony Cook <t...@develop-help.com>
Thu, 27 Nov 2014 09:32:51 +1100
On Wed, Nov 26, 2014 at 02:39:52PM -0700, Karl Williamson wrote:
> We're getting this failure on os390:> > #   Failed test 'S_IFMT()'> #   at Fcntl/t/mode.t line 88.> #          got: '4278190080'> #     expected: '-16777216'> > If you add those two numbers up it becomes clear that this bug is> merely one of signed vs unsigned.  Likely a constant is missing its> trailing 'U' to make it unsigned.  But I don't see where.> > Can someone provide some insight into fixing this?

Try the following:

diff --git a/ext/Fcntl/Makefile.PL b/ext/Fcntl/Makefile.PL
index ccd90c9..ec17548 100644
--- a/ext/Fcntl/Makefile.PL
+++ b/ext/Fcntl/Makefile.PL
@@ -37,7 +37,7 @@ my @names = (qw(
             {name=>"SEEK_SET", default=>["IV", "0"]},
             {name=>"SEEK_CUR", default=>["IV", "1"]},
             {name=>"SEEK_END", default=>["IV", "2"]},
-            {name=>"_S_IFMT", macro=>"S_IFMT", value=>"S_IFMT"});
+            {name=>"_S_IFMT", macro=>"S_IFMT", value=>"S_IFMT", type=>"UV"});
 WriteConstants(
     PROXYSUBS => {autoload => 1},
     NAME => 'Fcntl',

I suspect the other S_I* constants should be unsigned too.

Tony

Recent Messages in this Thread
Karl Williamson Nov 26, 2014 09:39 pm
Craig A. Berry Nov 26, 2014 10:14 pm
Ray Mullins Nov 26, 2014 10:25 pm
Tony Cook Nov 26, 2014 10:32 pm
Karl Williamson Nov 28, 2014 06:56 pm
Karl Williamson Nov 28, 2014 07:46 pm
Messages in this thread