Re: AIX 4.3 getaddrinfo busted

Поиск
Список
Период
Сортировка
От Andrew Chernow
Тема Re: AIX 4.3 getaddrinfo busted
Дата
Msg-id 497A0101.7060007@esilo.com
обсуждение исходный текст
Ответ на Re: AIX 4.3 getaddrinfo busted  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: AIX 4.3 getaddrinfo busted  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: AIX 4.3 getaddrinfo busted
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Controlling hot standby