--On Saturday, August 09, 2003 18:57:10 -0400 Tom Lane <[EMAIL PROTECTED]> wrote:

Larry Rosenman <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to