[freetds] ODBC on 64 bit linux fix.
Steve Langasek
vorlon at dodds.net
Fri Jan 18 04:01:03 EST 2008
Hi Sebastien,
On Fri, Jan 18, 2008 at 09:19:18AM +0100, Sebastien FLAESCH wrote:
> So first I doubt that Christos patch is I good idea:
> -SQLParamOptions(SQLHSTMT hstmt, SQLULEN crow, SQLULEN FAR * pirow)
> +SQLParamOptions(SQLHSTMT hstmt, SQLUINTEGER crow, SQLUINTEGER FAR * pirow)
> Changing SQLULEN to SQLUINTEGER in FreeTDS would break the standards... no?
Yes, I didn't look closely at this part of the patch. In those cases where
the ODBC standard is historically broken for 64-bit, it's because the API
calls for a SQLUINTEGER or SQLINTEGER where a 64-bit SQLLEN/SQLULEN is
needed to accomodate the range of possible values being passed; it would
never be appropriate to change an API call that's specified as SQLULEN to
SQLUINTEGER instead as part of the 64-bit porting.
> If we don't define BUILD_REAL_64_BIT_MODE, SQLLEN would be an int4, since
> int is 4 bytes on a 64b linux ... right?
All 64-bit Linux implementations are LP64, which means sizeof(int) = 4, yes.
Cheers,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek at ubuntu.com vorlon at debian.org
More information about the FreeTDS
mailing list