freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Sebastien FLAESCH <sf AT 4js.com>
- To: freetds AT lists.ibiblio.org
- Subject: Re: [freetds] ODBC on 64 bit linux fix.
- Date: Fri, 18 Jan 2008 09:19:18 +0100
Hi all,
We are about to test our product with FreeTDS on Linux 64b...
In our code we use SQLULEN and SQLLEN (comes from the Windows 64b port
experience):
SQLRETURN r;
SQLUSMALLINT pos = i + 1;
SQLSMALLINT namelen;
SQLSMALLINT sqltype;
* SQLULEN precision;
SQLSMALLINT scale;
SQLSMALLINT nullable;
* SQLULEN size;
SQLSMALLINT ctype = 0;
r = SQLDescribeCol(st->stmtHandle, pos, NULL, 0,
&namelen, &sqltype, &precision, &scale, &nullable);
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?
If I understand properly, we should define BUILD_REAL_64_BIT_MODE when
compiling or application code... is this correct?
According to the UnixODBC headers (sqltype.h):
#if (SIZEOF_LONG == 8)
#ifndef BUILD_REAL_64_BIT_MODE
typedef int SQLINTEGER;
typedef unsigned int SQLUINTEGER;
#define SQLLEN SQLINTEGER
#define SQLULEN SQLUINTEGER
#define SQLSETPOSIROW SQLUSMALLINT
typedef SQLULEN SQLROWCOUNT;
typedef SQLULEN SQLROWSETSIZE;
typedef SQLULEN SQLTRANSID;
typedef SQLLEN SQLROWOFFSET;
#else
typedef int SQLINTEGER;
typedef unsigned int SQLUINTEGER;
typedef long SQLLEN;
typedef unsigned long SQLULEN;
typedef unsigned long SQLSETPOSIROW;
...
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?
Thanks,
Seb
-
[freetds] ODBC on 64 bit linux fix.,
Christos Zoulas, 01/17/2008
-
Re: [freetds] ODBC on 64 bit linux fix.,
Steve Langasek, 01/17/2008
-
Re: [freetds] ODBC on 64 bit linux fix.,
Christos Zoulas, 01/17/2008
-
Re: [freetds] ODBC on 64 bit linux fix.,
Steve Langasek, 01/17/2008
-
Re: [freetds] ODBC on 64 bit linux fix.,
Sebastien FLAESCH, 01/18/2008
-
Re: [freetds] ODBC on 64 bit linux fix.,
Steve Langasek, 01/18/2008
-
Re: [freetds] ODBC on 64 bit linux fix.,
Sebastien FLAESCH, 01/18/2008
- Re: [freetds] ODBC on 64 bit linux fix., Sebastien FLAESCH, 01/18/2008
- Re: [freetds] ODBC on 64 bit linux fix., Christos Zoulas, 01/18/2008
- Re: [freetds] ODBC on 64 bit linux fix., ZIGLIO, Frediano, VF-IT, 01/18/2008
- Re: [freetds] ODBC on 64 bit linux fix., Sebastien FLAESCH, 01/18/2008
- Re: [freetds] ODBC on 64 bit linux fix., ZIGLIO, Frediano, VF-IT, 01/21/2008
- Re: [freetds] ODBC on 64 bit linux fix., Sebastien FLAESCH, 01/21/2008
- Re: [freetds] ODBC on 64 bit linux fix., ZIGLIO, Frediano, VF-IT, 01/21/2008
- [freetds] ODBC on 64 bit linux - test64, ZIGLIO, Frediano, VF-IT, 01/21/2008
-
Re: [freetds] ODBC on 64 bit linux fix.,
Sebastien FLAESCH, 01/18/2008
-
Re: [freetds] ODBC on 64 bit linux fix.,
Steve Langasek, 01/18/2008
-
Re: [freetds] ODBC on 64 bit linux fix.,
Sebastien FLAESCH, 01/18/2008
-
Re: [freetds] ODBC on 64 bit linux fix.,
Steve Langasek, 01/17/2008
-
Re: [freetds] ODBC on 64 bit linux fix.,
Christos Zoulas, 01/17/2008
-
Re: [freetds] ODBC on 64 bit linux fix.,
Steve Langasek, 01/17/2008
Archive powered by MHonArc 2.6.24.