Re: Bug Report with Postgres 7.4 on AIX 5.3 - Mailing list pgsql-bugs

From Andrew - Supernews
Subject Re: Bug Report with Postgres 7.4 on AIX 5.3
Date
Msg-id slrnd84ql0.tqf.andrew+nonews@trinity.supernews.net
Whole thread Raw
In response to Re: Bug Report with Postgres 7.4 on AIX 5.3  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On 2005-05-11, Vincent Vanwynsberghe <vvanwynsberghe@ccncsi.net> wrote:
> The AIX 5.3 provide the structure sockaddr_storage :
>
> struct sockaddr_storage {
>         ushort_t        __ss_family;    /* address family */
>         char            __ss_pad1[_SS_PAD1SIZE]; /* pad up to alignment
> field */
> #if defined(__64BIT__) || (defined(_ALL_SOURCE) && defined(_LONG_LONG))
>         int64_t         __ss_align;     /* field to force desired structure
> */
>                                         /* storage alignment */
> #else
>         int             __ss_align[2];
> #endif
>         char            __ss_pad2[_SS_PAD2SIZE];
>                                 /* pad to achieve desired size */
> };

If the size of sockaddr_storage is less than the size of sockaddr_un
(or any sockaddr_* structure) then this is a bug in AIX, because the
Unix standards clearly specify that sockaddr_storage must be both sized
and aligned such that a sockaddr_* struct for any supported protocol
can be stored there.

See the entry for <sys/socket.h> in the Headers chapter of the
Base Definitions volume of the SUSv3.

--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Missing tables in postgresql 7.2.4
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #1660: Growing used memory and critical performance loss