Re: 7.4beta1 build problem on unixware

From: Larry Rosenman <ler(at)lerctr(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kurt Roeckx <Q(at)ping(dot)be>, ohp(at)pyrenet(dot)fr, pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: 7.4beta1 build problem on unixware
Date: 2003-08-09 23:45:15
Message-ID: 371340000.1060472714@lerlaptop.lerctr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

--On Saturday, August 09, 2003 18:57:10 -0400 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
wrote:

> Larry Rosenman <ler(at)lerctr(dot)org> writes:
>> Ok, with using OUR src/port/getaddrinfo.c (by #undef'ing
>> HAVE_GETADDRINFO and adding getaddrinfo.o to Makefile.global's LIBOBJS,
>> it works again.
>
>> We need to devise a configure test for broken/old getaddrinfo()'s.
>
> That seems Turing-complete in general :-(.
>
> It may well be that the problem is not so much that your getaddrinfo
> doesn't work, as that we're not interfacing to it correctly. Which of
> the macros in src/include/getaddrinfo.h are actually being absorbed from
> the system headers, and which are we using our own values for?
Good question.

Here's excerpts from UnixWare's /usr/include/netdb.h:

/*
* Flag values for getaddrinfo()
*/
#define AI_PASSIVE 0x01 /* socket address is intended for bind() */
#define AI_CANONNAME 0x02 /* request for canonical name */
/*
* Error values for getaddrinfo()
*/
#define EAI_BADFLAGS 1 /* invalid value for ai_flags */
#define EAI_NONAME 2 /* neither name nor service provided/found
*/
#define EAI_AGAIN 3 /* temporary failure in name resolution */
#define EAI_FAIL 4 /* non-recoverable failure in name resoln */
#define EAI_NODATA 5 /* no address associated with name */
#define EAI_FAMILY 6 /* ai_family not supported */
#define EAI_SOCKTYPE 7 /* ai_socktype not supported */
#define EAI_SERVICE 8 /* service not supported for ai_socktype */
#define EAI_ADDRFAMILY 9 /* address family for name not supported */
#define EAI_MEMORY 10 /* memory allocation failure */
#define EAI_SYSTEM 11 /* system error */
/*
* Structure used by getaddrinfo()
*/
struct addrinfo {
int ai_flags; /* input flags */
int ai_family; /* protofamily for socket */
int ai_socktype; /* socket type */
int ai_protocol; /* protocol for socket */
int ai_addrlen; /* length of socket address */
struct sockaddr *ai_addr; /* socket address */
char *ai_canonname; /* canonical name for service locn
*/
struct addrinfo *ai_next; /* pointer to next in list */
};

a copy of the manpage is at:
http://www.lerctr.org:8458/en/man/html.3N/getaddrinfo.3N.html

I'm at a loss from here....

LER

>
> regards, tom lane

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Creager 2003-08-09 23:48:38 7.4Beta1 hang?
Previous Message Kurt Roeckx 2003-08-09 23:28:58 Re: address family failure message