Re: pgsql: Define INADDR_NONE on Solaris when it's missing.

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: pgsql: Define INADDR_NONE on Solaris when it's missing.
Дата
Msg-id 9837222c1001281207r6aa12623w51ec98684cc9dfaa@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgsql: Define INADDR_NONE on Solaris when it's missing.  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pgsql: Define INADDR_NONE on Solaris when it's missing.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-committers
On Thu, Jan 28, 2010 at 17:16, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Magnus Hagander <magnus@hagander.net> writes:
>> On Thu, Jan 28, 2010 at 17:04, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> I think what this shows is we should look for a way to avoid using
>>> INADDR_NONE.
>
>>> From some more googling
>> (http://www.opengroup.org/onlinepubs/000095399/functions/inet_addr.html),
>> it says it will return (in_addr_t)(-1), though, so maybe we should
>> just move that #ifdef out to some global place?
>
> Given the way that's written, I think we should just compare the result
> to (in_addr_t)(-1), and not assume there's any macro provided for that.

Well, that doesn't match all other platforms..


> However, now that I know the real issue is you're using inet_addr, I
> would like to know why you're not using inet_aton instead; or even
> better, something that also copes with IPv6.

"Path of least resistance?"

Which method would you suggest?


--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

В списке pgsql-committers по дате отправления:

Предыдущее
От: heikki@postgresql.org (Heikki Linnakangas)
Дата:
Сообщение: pgsql: Fix crashing bug at the end of recovery in Streaming Replication,
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Define INADDR_NONE on Solaris when it's missing.