Re: [HACKERS] inet data type regression test fails

From: Taral <taral(at)taral(dot)net>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] inet data type regression test fails
Date: 1999-05-09 20:51:10
Message-ID: Pine.LNX.4.10.9905091547390.8677-100000@dragon.taral.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Taral 1999-05-09 20:52:17 Re: [HACKERS] Oops, I seem to have changed UNION's behavior
Previous Message Bruce Momjian 1999-05-09 20:10:52 Re: [HACKERS] libpq and SPI