AF_UNSPEC vs PF_UNSPEC

Поиск
Список
Период
Сортировка
От Tom Lane
Тема AF_UNSPEC vs PF_UNSPEC
Дата
Msg-id 28023.1397665583@sss.pgh.pa.us
обсуждение исходный текст
Список pgsql-hackers
While wondering what the heck is going on in
http://www.postgresql.org/message-id/534E8FBB.9060006@gmail.com
I chanced to notice that pgstat.c and a couple of other places set
up arguments for getaddrinfo() like this:
hints.ai_family = PF_UNSPEC;

whereas the Single Unix Spec says clearly that AF_UNSPEC is what
to write if you're not intending to constrain the address family.
AF_UNSPEC is what we use in the majority of places, too.

On Linux, at least, these symbols have the same value so it doesn't
matter; but I wonder whether they are different on recent Cygwin.

Anyway, I think this is clearly wrong and we should change it.
I see a "PF_INET" that presumably ought to be "AF_INET" in
pg_dump/parallel.c, too.
        regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Dynamic Background Workers and clean exit
Следующее
От: Andres Freund
Дата:
Сообщение: Re: bgworker crashed or not?