From 972df48076a53d00c30a1a2d2eabad99530f6522 Mon Sep 17 00:00:00 2001 From: Max Khon Date: Sun, 12 Nov 2006 13:50:54 +0000 Subject: Fix build on 64-bit arches (amd64). Pointed out by: kris (via pointyhat) --- .../libodbc++/files/patch-src-datahandler.cpp | 11 ++++++++ databases/libodbc++/files/patch-src-datahandler.h | 25 +++++++++++++++++ databases/libodbc++/files/patch-src-datastream.cpp | 29 ++++++++++++++++++++ databases/libodbc++/files/patch-src-datastream.h | 31 ++++++++++++++++++++-- .../files/patch-src-preparedstatement.cpp | 11 ++++++++ .../files/patch-src-resultsetmetadata.cpp | 20 ++++++++++++++ databases/libodbc++/files/patch-src-statement.cpp | 11 ++++++++ 7 files changed, 136 insertions(+), 2 deletions(-) create mode 100644 databases/libodbc++/files/patch-src-datahandler.cpp create mode 100644 databases/libodbc++/files/patch-src-datahandler.h create mode 100644 databases/libodbc++/files/patch-src-datastream.cpp create mode 100644 databases/libodbc++/files/patch-src-preparedstatement.cpp create mode 100644 databases/libodbc++/files/patch-src-resultsetmetadata.cpp create mode 100644 databases/libodbc++/files/patch-src-statement.cpp (limited to 'databases/libodbc++/files') diff --git a/databases/libodbc++/files/patch-src-datahandler.cpp b/databases/libodbc++/files/patch-src-datahandler.cpp new file mode 100644 index 000000000000..7ecba7724b29 --- /dev/null +++ b/databases/libodbc++/files/patch-src-datahandler.cpp @@ -0,0 +1,11 @@ +--- src/datahandler.cpp.orig Sun Nov 12 13:34:06 2006 ++++ src/datahandler.cpp Sun Nov 12 13:33:23 2006 +@@ -269,7 +269,7 @@ + }; + this->setupBuffer(bs); + +- dataStatus_=new SQLINTEGER[rows_]; ++ dataStatus_=new SQLLEN[rows_]; + + //set everything to NULL + for(unsigned int i=0; igptr() < this->egptr()) { return this->egptr() - this->gptr(); } +@@ -71,7 +77,7 @@ + } + + DataStreamBuf(ErrorHandler* eh, SQLHSTMT hstmt, int col, int cType, +- SQLINTEGER& dataStatus); ++ SQLLEN& dataStatus); + virtual ~DataStreamBuf(); + }; + +@@ -102,7 +108,7 @@ + friend class Rowset; + private: + DataStream(ErrorHandler* eh, SQLHSTMT hstmt, int column, int cType, +- SQLINTEGER& ds) ++ SQLLEN& ds) + : + #if !defined(ODBCXX_HAVE_ISO_CXXLIB) + DataStreamBase(eh,hstmt,column,cType,ds),std::istream(this->rdbuf()) diff --git a/databases/libodbc++/files/patch-src-preparedstatement.cpp b/databases/libodbc++/files/patch-src-preparedstatement.cpp new file mode 100644 index 000000000000..56a74708de26 --- /dev/null +++ b/databases/libodbc++/files/patch-src-preparedstatement.cpp @@ -0,0 +1,11 @@ +--- src/preparedstatement.cpp.orig Sun Nov 12 13:28:34 2006 ++++ src/preparedstatement.cpp Sun Nov 12 13:30:27 2006 +@@ -161,7 +161,7 @@ + numParams_=np; + + SQLSMALLINT sqlType; +- SQLUINTEGER prec; ++ SQLULEN prec; + SQLSMALLINT scale; + SQLSMALLINT nullable; + diff --git a/databases/libodbc++/files/patch-src-resultsetmetadata.cpp b/databases/libodbc++/files/patch-src-resultsetmetadata.cpp new file mode 100644 index 000000000000..febd474e7c47 --- /dev/null +++ b/databases/libodbc++/files/patch-src-resultsetmetadata.cpp @@ -0,0 +1,20 @@ +--- src/resultsetmetadata.cpp.orig Sun Nov 12 13:38:01 2006 ++++ src/resultsetmetadata.cpp Sun Nov 12 13:38:32 2006 +@@ -39,7 +39,7 @@ + int ResultSetMetaData::_getNumericAttribute(unsigned int col, + SQLUSMALLINT attr) + { +- SQLINTEGER res=0; ++ SQLLEN res=0; + SQLRETURN r= + ODBC3_C(SQLColAttribute,SQLColAttributes)(resultSet_->hstmt_, + (SQLUSMALLINT)col, +@@ -63,7 +63,7 @@ + odbc::Deleter _buf(buf,true); + buf[maxlen]=0; + +- SQLINTEGER res=0; ++ SQLLEN res=0; + SQLSMALLINT len=0; + + SQLRETURN r= diff --git a/databases/libodbc++/files/patch-src-statement.cpp b/databases/libodbc++/files/patch-src-statement.cpp new file mode 100644 index 000000000000..2f0e536d65d1 --- /dev/null +++ b/databases/libodbc++/files/patch-src-statement.cpp @@ -0,0 +1,11 @@ +--- src/statement.cpp.orig Sun Nov 12 13:26:35 2006 ++++ src/statement.cpp Sun Nov 12 13:26:47 2006 +@@ -672,7 +672,7 @@ + + if(lastExecute_!=ODBC3_C(SQL_NO_DATA,SQL_NO_DATA_FOUND)) { + +- SQLINTEGER res; ++ SQLLEN res; + SQLRETURN r=SQLRowCount(hstmt_,&res); + this->_checkStmtError(hstmt_,r,"Error fetching update count"); + return res; -- cgit v1.2.3