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:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=71618
Originator: NO
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_);
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.