Share

libodbc++

Tracker: Patches

5 64-bit fixes - ID: 1595055
Last Update: Comment added ( vadz )

The patches fixes issues with SQLLEN != SQLINTEGER on
64-bit platforms (e.g. emt64)


Max Khon ( fjoe ) - 2006-11-12 14:04

5

Open

None

Nobody/Anonymous

None

None

Public


Comments ( 2 )




Date: 2009-10-17 20:23
Sender: vadzAccepting Donations

I think this patch was applied to 0.2.5 already, at least I threw away
these changes from my local copy and it still builds fine under
Linux/amd64. So AFAICS this could be closed.


Date: 2007-12-10 12:44
Sender: vadzAccepting Donations


I can confirm that the attached patch fixes most of the compilation
problems under Linux x86_64. With g++ 4.1 2 additional small changes are
needed as you can't cast void* (sizeof 8) to int (sizeof 4) with it, even
using reinterpret_cast. A trivial fix is to cast to long (sizeof 8)
instead:

Index: src/resultset.cpp
===================================================================
RCS file: /var/cvs/devel/3rdparty/libodbcxx/src/resultset.cpp,v
retrieving revision 1.2
diff -u -2 -r1.2 resultset.cpp
--- src/resultset.cpp 23 Apr 2005 23:57:53 -0000 1.2
+++ src/resultset.cpp 10 Dec 2007 12:42:18 -0000
@@ -534,5 +534,5 @@
this->_checkStmtError(hstmt_,r,"SQLParamData failure");
if(r==SQL_NEED_DATA) {
- DataHandler* dh=rowset_->getColumn((int)currentCol);
+ DataHandler* dh=rowset_->getColumn((long)currentCol);

assert(dh->isStreamed_);
Index: src/preparedstatement.cpp
===================================================================
RCS file: /var/cvs/devel/3rdparty/libodbcxx/src/preparedstatement.cpp,v
retrieving revision 1.2
diff -u -2 -r1.2 preparedstatement.cpp
--- src/preparedstatement.cpp 18 Jun 2007 14:46:09 -0000 1.2
+++ src/preparedstatement.cpp 10 Dec 2007 12:42:18 -0000
@@ -309,5 +309,5 @@
this->_checkStmtError(hstmt_,r,"SQLParamData failure");
if(r==SQL_NEED_DATA) {
- DataHandler* dh=rowset_->getColumn((int)currentCol);
+ DataHandler* dh=rowset_->getColumn((long)currentCol);

assert(dh->isStreamed_);



Log in to comment.

Attached File ( 1 )

Filename Description Download
libodbcpp.patch Download

Change ( 1 )

Field Old Value Date By
File Added 202457: libodbcpp.patch 2006-11-12 14:04 fjoe