| Store | Cart

Re: S_IFMT()

From: Craig A. Berry <crai...@gmail.com>
Wed, 26 Nov 2014 16:14:09 -0600
On Wed, Nov 26, 2014 at 3:39 PM, Karl Williamson
<pub...@khwilliamson.com> 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?

The constants are written by the Makefile.PL, which uses
WriteConstants from ExtUtils::Constant.  The type of _S_IFMT does not
seem to be specified at
<http://perl5.git.perl.org/perl.git/blob/HEAD:/ext/Fcntl/Makefile.PL#l40>,
so apparently it will default to IV according to
<http://perl5.git.perl.org/perl.git/blob/HEAD:/cpan/ExtUtils-Constant/lib/ExtUtils/Constant.pm#l484>.
Maybe it should be specified as UV?

But it would probably also be useful to grep S_IFMT in the generated
const-xs.inc and inspect the value of S_IFMT in whatever system header
it comes from (stat.h?).

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

Previous post: S_IFMT()
Next post: Re: S_IFMT()