X-Original-To: pgsql-ports-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A625F528F6 for ; Mon, 8 Aug 2005 19:29:26 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 06576-10 for ; Mon, 8 Aug 2005 22:29:15 +0000 (GMT) Received: from pravda.gedanken.org (adsl-63-204-157-24.dsl.snfc21.pacbell.net [63.204.157.24]) by svr1.postgresql.org (Postfix) with ESMTP id 7F9195281B for ; Mon, 8 Aug 2005 19:29:13 -0300 (ADT) Received: from pravda.gedanken.org (localhost [127.0.0.1]) by pravda.gedanken.org (8.13.1+Sun/8.13.1) with ESMTP id j78MT8a7008575; Mon, 8 Aug 2005 15:29:08 -0700 (PDT) Received: (from logan@localhost) by pravda.gedanken.org (8.13.1+Sun/8.13.1/Submit) id j78MT8bt008574; Mon, 8 Aug 2005 15:29:08 -0700 (PDT) X-Authentication-Warning: pravda.gedanken.org: logan set sender to logan@gedanken.org using -f Date: Mon, 8 Aug 2005 15:29:08 -0700 From: "Logan O'Sullivan Bruns" To: "Mohan, Ross" Cc: pgsql-ports@postgresql.org Subject: Re: PostgreSQL 8.0.3, AIX 5.1, getaddrinfo, AI_NUMERICHOST Message-ID: <20050808222907.GY6200@pravda.gedanken.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200508/8 X-Sequence-Number: 2183 For AIX 5.1, if I compile it as is with the 4 value then it SEGVs but it is fine if I set it to zero. They have the define in the header but not in the manual page. My guess is that at least in 5.1 it is an incomplete implementation. The header more accurately reflects the RFC then the actual implementation. I do agree though it isn't postgres's fault and it sounds like it is fixed in AIX 5.3 anyway. Thanks, logan On Mon, Aug 08, 2005 at 10:04:24PM -0000, Mohan, Ross wrote: > "Yea, what he said" ;-) > > > I found the working stuff in getaddrinfo.h in PG distro only. > > However, in NETDB.H as Logan noted, it is there on my 5.3 AIX: > > .... > /* Flag definitions for addrinfo hints in protocol-independent name/addr/service service. RFC2133 */ > /* Also flag definitions for getipnodebyname RFC 2553 */ > #define AI_CANONNAME 0x01 /* canonical name to be included in return */ > #define AI_PASSIVE 0x02 /* prepare return for call to bind() */ > #define AI_NUMERICHOST 0x04 /* RFC 2553, nodename is a numeric host address string */ > #define AI_ADDRCONFIG 0x08 /* RFC 2553, source address family configured */ > #define AI_V4MAPPED 0x10 /* RFC 2553, accept v4 mapped addresses */ > #define AI_ALL 0x20 /* RFC 2553, accept all addresses */ > #define AI_NUMERICSERV 0x40 /* RFC 2553, service name is a numeric string */ > #define AI_DEFAULT (AI_V4MAPPED | AI_ADDRCONFIG) /* RFC 2553 */ > ..... > > > > I wonder if the 4 vice 0 is an issue....think not, b/c the > PG distro header has a good IFDEF stanza for this.... > > > > > -----Original Message----- > From: Tom Lane [mailto:tgl@sss.pgh.pa.us] > Sent: Mon 08-Aug-05 5:06 PM > To: Logan O'Sullivan Bruns > Cc: Mohan, Ross; pgsql-ports@postgresql.org > Subject: Re: [PORTS] PostgreSQL 8.0.3, AIX 5.1, getaddrinfo, AI_NUMERICHOST > "Logan O'Sullivan Bruns" writes: > > I only have access to AIX5.1. On 5.1 the relevant prototype and > > defines are in netdb.h. > > > The man page for has: > > > struct addrinfo { > > int ai_flags; /* AI_PASSIVE, AI_CANONNAME */ > > > Note the absence of AI_NUMERICHOST. It isn't mentioned anywhere in the > > man page but it is present in the header. > > Defined how? > > We do have > > #ifndef AI_NUMERICHOST > #define AI_NUMERICHOST 0 > #endif > > in our own code, so we should do the right thing on platforms that don't > define the symbol. If AIX 5.1 defines the symbol and then chokes when > you use it, that's a bug to take up with IBM, not us. > > regards, tom lane > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: explain analyze is your friend