Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 12926 invoked from network); 18 Jun 2008 02:24:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jun 2008 02:24:50 -0000 Received: (qmail 59875 invoked by uid 500); 18 Jun 2008 02:24:51 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 59809 invoked by uid 500); 18 Jun 2008 02:24:51 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 59798 invoked by uid 99); 18 Jun 2008 02:24:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jun 2008 19:24:51 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bojan@rexursive.com designates 203.171.74.242 as permitted sender) Received: from [203.171.74.242] (HELO beauty.rexursive.com) (203.171.74.242) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jun 2008 02:24:02 +0000 Received: from [10.1.120.24] (shrek.rexursive.com [10.1.120.24]) by beauty.rexursive.com (Postfix) with ESMTP id 45EE940330; Wed, 18 Jun 2008 12:24:20 +1000 (EST) Subject: Re: Warnings for apr_dbd_odbc.c on 64-bit platforms From: Bojan Smojver To: Tom.Donovan@acm.org Cc: APR Developer List In-Reply-To: <48586CBC.7080509@bellatlantic.net> References: <1213747952.6007.10.camel@shrek.rexursive.com> <48586CBC.7080509@bellatlantic.net> Content-Type: text/plain Date: Wed, 18 Jun 2008 12:24:18 +1000 Message-Id: <1213755858.6007.27.camel@shrek.rexursive.com> Mime-Version: 1.0 X-Mailer: Evolution 2.22.2 (2.22.2-2.fc9) Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Tue, 2008-06-17 at 22:02 -0400, Tom Donovan wrote: > > The Microsoft ODBC docs at http://msdn.microsoft.com/en-us/library/ms713605(VS.85).aspx say: > > SQLPOINTER ValuePtr > [Input] Pointer to the value to be associated with Attribute. Depending on the value of > Attribute, ValuePtr will be a 32-bit unsigned integer value or will point to a null-terminated > character string. Note that if the Attribute argument is a driver-specific value, the value in > ValuePtr may be a signed integer. > > The DB2 CLI/ODBC docs say the same - > http://publib.boulder.ibm.com/infocenter/db2luw/v8/topic/com.ibm.db2.udb.doc/ad/r0000646.htm > > UnixODBC & iODBC usually treat the MS ODBC docs as authoritative, so it seems likely that this is as > intended. I don't have a 64-bit system to give it a try on. > > hmmm... ODBC really shows its age here! Yeah, it does. SQLPOINTER on Linux is defined as void *, so it will be a 64-bit value on 64-bit systems, contrary to the above 32-bit assumption. This kind of pointer/integer mixing is really a bad idea, but there is nothing we can do about it, I guess. Thanks for the input. -- Bojan