From: Paul R. <pr...@ib...> - 2010-01-19 09:45:17
|
On Monday 18 January 2010, Bill Greene wrote: > > Before continuing my debugging, I just thought I'd see if anyone could > give me some specific > advice. Can anyone who has successfully built a 64-bit linux driver tell > me if my addition of > -DBUILD_REAL_64_BIT_MODE -DSIZEOF_LONG=8 is the right thing to do (I do > know that the sizeof(long) with g++ 4.1.2 -m64 is 8, of course)? > Here is an edited (and indented) extract from sqltypes.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 ... #else typedef int SQLINTEGER; typedef unsigned int SQLUINTEGER; typedef long SQLLEN; typedef unsigned long SQLULEN; typedef unsigned long SQLSETPOSIROW; ... #endif #else typedef long SQLINTEGER; typedef unsigned long SQLUINTEGER; #define SQLLEN SQLINTEGER #define SQLULEN SQLUINTEGER #define SQLSETPOSIROW SQLUSMALLINT ... #endif If I understand this correctly it means, for example, that -DBUILD_REAL_64_BIT_MODE -DSIZEOF_LONG=8 declares SQLLEN as a long which is the same as if neither define is used. The only define which is different is for SQLSETPOSIROW. That is only used in main.cpp: SQLSetPos( SQLHSTMT hStmt, SQLSETPOSIROW iRow, SQLUSMALLINT fOption, SQLUSMALLINT fLock ) which calls: OdbcStatement::sqlSetPos (SQLUSMALLINT row, SQLUSMALLINT operation, SQLUSMALLINT lockType) It looks as if that declaration needs changing. I doubt if that is the cause of all your problems, but it certainly indicates that there is still some work to do to complete the 64-bit port. Unfortunately I don't think anyone is working on this at the moment. If you get to make any progress and want to submit a patch I will be happy to apply it. Paul -- Paul Reeves http://www.ibphoenix.com Specialists in Firebird support |