From: | Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp> |
---|---|
To: | Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp> |
Cc: | hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] inet data type regression test fails |
Date: | 1999-02-22 14:09:08 |
Message-ID: | 199902221409.XAA00832@ext16.sra.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> The inet regression test has been failed on my LinuxPPC. While
> investigating the reason, I found a code that doesn't work on
> LinuxPPC. From network_broadcast() in utils/adt/network.c:
>
> int addr = htonl(ntohl(ip_v4addr(ip)) | (0xffffffff >> ip_bits(ip)));
>
> Here ip_bits() returns from (unsigned char)0 to 32. My question is:
> what is the correct result of (0xffffffff >> ip_bits())?
I should have said that:
what is the correct result of (0xffffffff >> ip_bits()) if ip_bits() == 32?
> 1. 0x0
> 2. 0xffffffff (actually does nothing)
>
> LinuxPPC is 1. FreeBSD and Solaris are 2. network_broadcast() seems to
> expect 2. My guess is shifting over 32bit against a 32bit integer is
> not permitted and the result is platform depedent. If this would true,
> it could be said that network_broadcast() has a portabilty
> problem. Comments?
> ---
> Tatsuo Ishii
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 1999-02-22 15:10:22 | Re: [HACKERS] Re: Max backend limits cleaned up |
Previous Message | Andy Selle | 1999-02-22 13:46:09 | Re: [HACKERS] SELECT COUNT(DISTINCT) |