Re: OSF build fixed - Mailing list pgsql-hackers

From Tom Lane
Subject Re: OSF build fixed
Date
Msg-id 8862.1058303692@sss.pgh.pa.us
Whole thread Raw
In response to Re: OSF build fixed  (Kurt Roeckx <Q@ping.be>)
Responses Re: OSF build fixed  (Kurt Roeckx <Q@ping.be>)
List pgsql-hackers
Kurt Roeckx <Q@ping.be> writes:
> Note that the RFC has 2 examples, one without sa_len, an other
> with sa_len.

If you're talking about RFC 3493, the example with ss_len is flat wrong,
since it fails to allow for the (strong) possibility that there will be
a pad byte between ss_len and ss_family.  This will typically result in
making the struct alignof(int64) bigger than intended, since __ss_pad1
will be one byte too big, forcing __ss_align up to the next allowable
alignment boundary.  This is no doubt harmless, but there is little
point in having such a complicated declaration if it fails to achieve
its intended goal of exactly controlling the struct's size and
alignment.

BTW, where are we getting the "SALEN" macro from, and how are we sure
that it tells the truth about whether the platform expects an ss_len
field?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [ADMIN] problems with pg_restore
Next
From: Kurt Roeckx
Date:
Subject: Re: OSF build fixed