Skip to Content.
Sympa Menu

freetds - Re: [freetds] ODBC on 64 bit linux fix.

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] ODBC on 64 bit linux fix.
  • Date: Fri, 18 Jan 2008 17:02:09 +0100

>
> On Jan 18, 10:22am, sf AT 4js.com (Sebastien FLAESCH) wrote:
> -- Subject: Re: [freetds] ODBC on 64 bit linux fix.
>
> | Thank you Steve,
> |
> | Here is what we have tested:
> |
> | CFLAGS="-D BUILD_REAL_64_BIT_MODE" ./configure
> --prefix=/opt3/dbs/tds/0.83 --with-odbc-nodm=/opt3/dbs/uxo/3.0
> |
> | But when compiling, we get:
> |
> | odbc.c:794: conflicting types for `SQLParamOptions'
> | /dbs/64bits/uxo/3.0/include/sqlext.h:1893: previous
> declaration of `SQLParamOptions'
> |
> | Am I missing something or is this what Christos tried to fix?
> |
> | The headers comme from UnixODBC 2.2.12 ...
> |
> | Cheers,
> | Seb
>
> Yes, this is what I fixed.
>
> christos

See http://support.microsoft.com/?scid=kb%3Ben-us%3B298678&x=14&y=7

Also from our configure.ac

# check is SQLParamOptions accept SQLULEN
AC_TRY_COMPILE([#if defined(_WIN32) || defined(WIN32) ||
defined(__MINGW32__)
#include <windows.h>
#endif
#include <sql.h>
#include <sqlext.h>

SQLRETURN SQL_API SQLParamOptions(SQLHSTMT hstmt,
SQLULEN crow, SQLULEN *pirow) {
return SQL_SUCCESS;
}], [return 0],
AC_DEFINE(TDS_SQLPARAMOPTIONS_SQLLEN, 1, [Define to 1 if
SQLParamOptions accept SQLULEN as arguments]))
)

but in odbc.c

SQLRETURN ODBC_API
SQLParamOptions(SQLHSTMT hstmt, SQLULEN crow, SQLULEN FAR * pirow)
{
SQLRETURN res;

This is a problem in MS specifications... pirow should correspond to
SQL_ATTR_PARAMS_PROCESSED_PTR which is not 64-bit according which above
link. Also SQL_ATTR_PARAMS_PROCESSED_PTR (see SQLSetStmtAttr
documentation) maps to IPD SQL_DESC_ROWS_PROCESSED_PTR which is not
documented as 64-bit. However SQL_ATTR_ROWS_FETCHED_PTR which correspond
to IRD SQL_DESC_ROWS_PROCESSED_PTR is documented as 64-bit. So is
SQL_DESC_ROWS_PROCESSED_PTR 32 or 64 bit?? Is it 64-bit only for IRD??
Does pirow maps really to SQL_ATTR_PARAMS_PROCESSED_PTR that maps on IPD
SQL_DESC_ROWS_PROCESSED_PTR?

Someone have a 64-bit windows machine to execute some test?? I can pass
some source test in order to test all that stuff... just to know how MS
implemented its specifications... Is MingW available for 64-bit??

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page