Re: AIX 4.3 getaddrinfo busted - Mailing list pgsql-hackers

From Andrew Chernow
Subject Re: AIX 4.3 getaddrinfo busted
Date
Msg-id 497A0101.7060007@esilo.com
Whole thread Raw
In response to Re: AIX 4.3 getaddrinfo busted  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: AIX 4.3 getaddrinfo busted  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> BTW, what about the comments in ip.c to the effect that some versions of
> AIX fail when getaddrinfo's second argument *is* null?
> 

For starters, it indicates that sin_port is not zero'd properly.  That 
wouldn't matter here since the plan is to manually set the port in this 
case, since providing it to getaddrinfo is broken.

Also, this is why I suggested only doing a NULL 2nd arg within the 
failure case.

rc = getaddrinfo(hostname, service, ....);

#ifdef _AIX
if(rc == EAI_NODATA && servname && *servname)  if(!(rc = getaddrinfo(hostname, NULL, ....))) /* try again */    /* set
sin_portor sin6_port */
 
#endif

// code continues as is from here down.

Or, set a define in configure indicating aix 4.3 or indicating the 2nd 
arg to getaddrinfo must be NULL (the former being much easier).  I don't 
think we have to resort to configure checks though.

-- 
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: AIX 4.3 getaddrinfo busted
Next
From: Simon Riggs
Date:
Subject: Re: Controlling hot standby