Re: [HACKERS] inet data type regression test fails - Mailing list pgsql-hackers

From Taral
Subject Re: [HACKERS] inet data type regression test fails
Date
Msg-id Pine.LNX.4.10.9905091547390.8677-100000@dragon.taral.net
Whole thread Raw
In response to Re: [HACKERS] inet data type regression test fails  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] inet data type regression test fails
List pgsql-hackers
On Sun, 9 May 1999, Bruce Momjian wrote:

> > int    addr = htonl(ntohl(ip_v4addr(ip)) | (0xffffffff >> ip_bits(ip)));

There needs to be a UL on the end of that constant. Otherwise it depends
on whether or not the compiler chooses to make it signed or unsigned. Not
only that, but shifting by >=32 is undefined... Intel chipsets will go mod
32 and change 32 to 0.

Taral



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] libpq and SPI
Next
From: Taral
Date:
Subject: Re: [HACKERS] Oops, I seem to have changed UNION's behavior