Re: 7.4beta1 build problem on unixware - Mailing list pgsql-hackers

From Larry Rosenman
Subject Re: 7.4beta1 build problem on unixware
Date
Msg-id 371340000.1060472714@lerlaptop.lerctr.org
Whole thread Raw
In response to Re: 7.4beta1 build problem on unixware  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

--On Saturday, August 09, 2003 18:57:10 -0400 Tom Lane <tgl@sss.pgh.pa.us> 
wrote:

> Larry Rosenman <ler@lerctr.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;      /*
protofamilyfor 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@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749



pgsql-hackers by date:

Previous
From: Kurt Roeckx
Date:
Subject: Re: address family failure message
Next
From: Robert Creager
Date:
Subject: 7.4Beta1 hang?