Re: pgsql-server/ /configure /configure.in rc/Make ... - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql-server/ /configure /configure.in rc/Make ...
Date
Msg-id 12450.1049062481@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql-server/ /configure /configure.in rc/Make ...  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgsql-server/ /configure /configure.in rc/Make ...
List pgsql-committers
I said:
> Hate to tell you, but this commit has *completely* broken things on
> non-IPv6-aware machines ...

... or at least on my machine.  The major difficulty seems to be that
the config setup assumes HAVE_GETADDRINFO means that <netdb.h> is where
to look for 'struct addrinfo' and friends.  This does not fly here.
I have HPUX 10.20, which is not ipv6 aware, but I also have a (plain
vanilla) built-from-source installation of BIND 9.2.2.  This provides
a /usr/lib/libbind.a that contains getaddrinfo() ... but it doesn't
overwrite the stock /usr/include/netdb.h.

There are definitions for the struct and so forth in
/usr/include/lwres/netdb.h, but it looks like to use those we'd also
have to use liblwres.a rather than libbind.a.

Not sure what's the most reasonable way to fix this.  Personally I'd
like to remove the use of -lbind for other reasons, but I suppose that'd
break things on other platforms.

Can we at least change the configure tests so that both 'struct
addrinfo' and 'getaddrinfo()' are checked for before deciding we don't
need our own implementation?  I'd also suggest doing some macro-renaming
so that our version of getaddrinfo is really called pq_getaddrinfo, or
some such, to avoid any possible link conflicts.

            regards, tom lane


pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql-server/doc/src/sgml func.sgml
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql-server/src/backend/storage/lmgr deadlock.c