Re: compile error via SIOCGLIFCONF from ip.c on hpux-11

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: compile error via SIOCGLIFCONF from ip.c on hpux-11
Дата
Msg-id AANLkTinKCiLkp-2+X1qrv_5JeonwGQ=MS-n+S7px13Yt@mail.gmail.com
обсуждение исходный текст
Ответ на Re: compile error via SIOCGLIFCONF from ip.c on hpux-11  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, Nov 29, 2010 at 2:26 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Merlin Moncure <mmoncure@gmail.com> writes:
>> How do you test this feature?
>
> Try src/tools/ifaddrs/test_ifaddrs.c.  I think the only usage in the
> core code is testing samehost/samenet matches in pg_hba.conf.

It looks like this is unfortunately more involved.  The test of my
adjustment above immediately failed with ENOENT, which you have to
expect on hpux apparently.   According to some googling (see:

http://cvsweb.netbsd.org/bsdweb.cgi/src/dist/bind/lib/isc/unix/Attic/ifiter_ioctl.c?rev=1.1.1.4.4.1&content-type=text/x-cvsweb-markup
and others), the long method returns ip6 addresses and the short
method returns ip4 addresses, and you have to do both on hpux always.

Forcing the short method, the test worked, I got the loopback and the
local address.  So we have a couple of options here: hacking the
foreach to use the short method on hpux is certainly better situation
than we have now, or fixing this 'properly', means refactoring this
file a bit and adding a configure test or leaning on an hpux macro.  I
have no way of testing the long form method I posed above -- does
anybody have an ipv6 hpux box?

merlin


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: compile error via SIOCGLIFCONF from ip.c on hpux-11
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: pg_execute_from_file review