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

Re: Unexpected numeric behavior

Thread Previous
From:
Nicholas Clark
Date:
August 1, 2001 02:18
Subject:
Re: Unexpected numeric behavior
Message ID:
20010801101845.K93963@plum.flirble.org
On Wed, Aug 01, 2001 at 12:21:55AM -0700, Kurt D. Starsinic wrote:
> Hi all,
> 
>     Is this the right thing?
> 
>     % perl5.6.1 -MPOSIX -MDevel::Peek -e 'Dump(POSIX::NOFLSH)'
>     SV = NV(0x810d440) at 0x80f815c
>       REFCNT = 1
>       FLAGS = (TEMP,NOK,pNOK)
>       NV = 2147483648
> 
>     % perl5.7.2 -MPOSIX -MDevel::Peek -e 'Dump(POSIX::NOFLSH)'
>     SV = IV(0x814b5a4) at 0x814015c
>       REFCNT = 1
>       FLAGS = (TEMP,IOK,pIOK)
>       IV = -2147483648
> 
>     NOFLSH is defined as 0x80000000 in <sys/termios.h>.
> 
>     Isn't an NV (or, IMHO, a UV) a superior representation?

It should be a UV. It may not be the only potential problem in this case
[But I thought I'd found them all. Does NOFLSH have to be 0x80000000, or
can an implementation chose any consistent value?]

The correct place to patch should be somewhere in POSIX's Makefile.PL, but
as I'm about to go to YPAC::Europe I'm hoping that I'll return on Sunday
to find it patched. :-)

Nicholas Clark
-- 
EAGAIN: http://plum.flirble.org/~nick/CV.html

Thread Previous


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