Re: 32-bit ints on 64-bit linux
- From: Kelly Burkhart <kelly(at)tradebotsystems(dot)com>
- To: pgsql-odbc(at)postgresql(dot)org
- Cc: Peter Eisentraut <peter_e(at)gmx(dot)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> <text/plain>
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
*** 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;
Home |
Main Index |
Thread Index