From: Kelly Burkhart <kelly@tradebotsystems.com>
To: pgsql-odbc@postgresql.org
Cc: Peter Eisentraut <peter_e@gmx.net>
Subject: Re: 32-bit ints on 64-bit linux
Date: Wed, 30 Mar 2005 12:37:14 -0600
Message-ID: <1112207834.3392.61.camel@krb06> (raw)
In-Reply-To: <200503302002.19608.peter_e@gmx.net>
References: <4224F80D.2080103@kkcsm.net>
<200503181625.09496.peter_e@gmx.net>
<1111433339.26601.89.camel@krb06>
<200503302002.19608.peter_e@gmx.net>
On Wed, 2005-03-30 at 12:02, Peter Eisentraut wrote:
> Kelly Burkhart wrote:
> > I suggested that the other format strings were questionable based on
> > a reading of the glibc printf man page. Aside from the 32-bit
> > integer problem the other formats work fine in the unmodified form on
> > the three platforms I use.
>
> Given the information provided by Tom Lane, would you submit an updated
> patch? Thanks.
Certainly. Here it is.
-K
Attachments:psqlodbc_convert.patch (text/x-patch, 770B) download
*** psqlodbc-08.00.0101/convert.c 2005-01-17 04:12:52.000000000 -0600
--- psqlodbc-08.00.0101.patch/convert.c 2005-03-30 12:28:48.669177482 -0600
***************
*** 2655,2661 ****
case SQL_C_SLONG:
case SQL_C_LONG:
! sprintf(param_string, "%ld",
*((SDWORD *) buffer));
break;
--- 2655,2661 ----
case SQL_C_SLONG:
case SQL_C_LONG:
! sprintf(param_string, "%d",
*((SDWORD *) buffer));
break;
***************
*** 2684,2690 ****
break;
case SQL_C_ULONG:
! sprintf(param_string, "%lu",
*((UDWORD *) buffer));
break;
--- 2684,2690 ----
break;
case SQL_C_ULONG:
! sprintf(param_string, "%u",
*((UDWORD *) buffer));
break;
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: kelly@tradebotsystems.com, peter_e@gmx.net
Subject: Re: 32-bit ints on 64-bit linux
In-Reply-To: <1112207834.3392.61.camel@krb06>
References: <4224F80D.2080103@kkcsm.net> <200503181625.09496.peter_e@gmx.net> <1111433339.26601.89.camel@krb06> <200503302002.19608.peter_e@gmx.net> <1112207834.3392.61.camel@krb06>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox