Re: PostgreSQL 8.0.3, AIX 5.1, getaddrinfo, AI_NUMERICHOST - Mailing list pgsql-ports

From Mohan, Ross
Subject Re: PostgreSQL 8.0.3, AIX 5.1, getaddrinfo, AI_NUMERICHOST
Date
Msg-id CC74E7E10A8A054798B6611BD1FEF4D30625DC78@vamail01.thexchange.com
Whole thread Raw
In response to PostgreSQL 8.0.3, AIX 5.1, getaddrinfo, AI_NUMERICHOST  ("Logan O'Sullivan Bruns" <logan@gedanken.org>)
Responses Re: PostgreSQL 8.0.3, AIX 5.1, getaddrinfo, AI_NUMERICHOST  ("Logan O'Sullivan Bruns" <logan@gedanken.org>)
List pgsql-ports
"Yea, what he said" ;-)


I found the working stuff in getaddrinfo.h in PG distro only.

However, in NETDB.H as Logan noted, it is there on my 5.3 AIX:

....
/* Flag definitions for addrinfo hints in protocol-independent name/addr/service service. RFC2133 */
/* Also flag definitions for getipnodebyname  RFC 2553  */
#define AI_CANONNAME    0x01    /* canonical name to be included in return */
#define AI_PASSIVE      0x02    /* prepare return for call to bind() */
#define AI_NUMERICHOST  0x04    /* RFC 2553, nodename is a numeric host address string */
#define AI_ADDRCONFIG   0x08    /* RFC 2553, source address family configured */
#define AI_V4MAPPED     0x10    /* RFC 2553, accept v4 mapped addresses */
#define AI_ALL          0x20    /* RFC 2553, accept all addresses */
#define AI_NUMERICSERV  0x40    /* RFC 2553, service name is a numeric string */
#define AI_DEFAULT      (AI_V4MAPPED | AI_ADDRCONFIG)     /* RFC 2553 */
.....



I wonder if the 4 vice 0 is an issue....think not, b/c the
PG distro header has a good IFDEF stanza for this....




-----Original Message-----
From:    Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent:    Mon 08-Aug-05 5:06 PM
To:    Logan O'Sullivan Bruns
Cc:    Mohan, Ross; pgsql-ports@postgresql.org
Subject:    Re: [PORTS] PostgreSQL 8.0.3, AIX 5.1, getaddrinfo, AI_NUMERICHOST
"Logan O'Sullivan Bruns" <logan@gedanken.org> writes:
> I only have access to AIX5.1. On 5.1 the relevant prototype and
> defines are in netdb.h.

> The man page for has:

> struct addrinfo {
>   int               ai_flags;          /* AI_PASSIVE, AI_CANONNAME */

> Note the absence of AI_NUMERICHOST. It isn't mentioned anywhere in the
> man page but it is present in the header.

Defined how?

We do have

#ifndef AI_NUMERICHOST
#define AI_NUMERICHOST 0
#endif

in our own code, so we should do the right thing on platforms that don't
define the symbol.  If AIX 5.1 defines the symbol and then chokes when
you use it, that's a bug to take up with IBM, not us.

            regards, tom lane




pgsql-ports by date:

Previous
From: Tom Lane
Date:
Subject: Re: PostgreSQL 8.0.3, AIX 5.1, getaddrinfo, AI_NUMERICHOST
Next
From: "Logan O'Sullivan Bruns"
Date:
Subject: Re: PostgreSQL 8.0.3, AIX 5.1, getaddrinfo, AI_NUMERICHOST