On 2005-05-11, Vincent Vanwynsberghe <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to