diff options
author | fjoe <fjoe@FreeBSD.org> | 2006-11-12 21:50:54 +0800 |
---|---|---|
committer | fjoe <fjoe@FreeBSD.org> | 2006-11-12 21:50:54 +0800 |
commit | c1a3c82dc908c9ee496b8e641dbd43c73cdc1713 (patch) | |
tree | 5972755f41cb7bfe4c7f82e347e0ccd56fa326bd /databases | |
parent | b5c789083ac3226cf7c025ded76212614a39f425 (diff) | |
download | freebsd-ports-gnome-c1a3c82dc908c9ee496b8e641dbd43c73cdc1713.tar.gz freebsd-ports-gnome-c1a3c82dc908c9ee496b8e641dbd43c73cdc1713.tar.zst freebsd-ports-gnome-c1a3c82dc908c9ee496b8e641dbd43c73cdc1713.zip |
Fix build on 64-bit arches (amd64).
Pointed out by: kris (via pointyhat)
Diffstat (limited to 'databases')
7 files changed, 136 insertions, 2 deletions
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; i<rows_; i++) { diff --git a/databases/libodbc++/files/patch-src-datahandler.h b/databases/libodbc++/files/patch-src-datahandler.h new file mode 100644 index 000000000000..64250dae8270 --- /dev/null +++ b/databases/libodbc++/files/patch-src-datahandler.h @@ -0,0 +1,25 @@ +--- src/datahandler.h.orig Sun Nov 12 13:34:24 2006 ++++ src/datahandler.h Sun Nov 12 13:33:01 2006 +@@ -48,7 +48,7 @@ + size_t rows_; + char* buffer_; + size_t bufferSize_; +- SQLINTEGER* dataStatus_; ++ SQLLEN* dataStatus_; + bool isStreamed_; + ODBCXX_STREAM* stream_; + bool ownStream_; +@@ -84,11 +84,11 @@ + return &buffer_[bufferSize_*currentRow_]; + } + +- void setDataStatus(SQLINTEGER i) { ++ void setDataStatus(SQLLEN i) { + dataStatus_[currentRow_]=i; + } + +- SQLINTEGER getDataStatus() const { ++ SQLLEN getDataStatus() const { + return dataStatus_[currentRow_]; + } + diff --git a/databases/libodbc++/files/patch-src-datastream.cpp b/databases/libodbc++/files/patch-src-datastream.cpp new file mode 100644 index 000000000000..b3a220c20798 --- /dev/null +++ b/databases/libodbc++/files/patch-src-datastream.cpp @@ -0,0 +1,29 @@ +--- src/datastream.cpp.orig Sun Nov 12 13:36:46 2006 ++++ src/datastream.cpp Sun Nov 12 13:39:05 2006 +@@ -30,7 +30,7 @@ + #if !defined(ODBCXX_QT) + + DataStreamBuf::DataStreamBuf(ErrorHandler* eh, SQLHSTMT hstmt, int col, +- int cType,SQLINTEGER& dataStatus) ++ int cType,SQLLEN& dataStatus) + :errorHandler_(eh), + hstmt_(hstmt), + column_(col), +@@ -78,7 +78,7 @@ + + //after the call, this is the number of bytes that were + //available _before_ the call +- SQLINTEGER bytes; ++ SQLLEN bytes; + + //the actual number of bytes that should end up in our buffer + //we don't care about NULL termination +@@ -134,7 +134,7 @@ + // really ugly + + DataStream::DataStream(ErrorHandler* eh, SQLHSTMT hstmt, int col, +- int cType,SQLINTEGER& dataStatus) ++ int cType,SQLLEN& dataStatus) + :errorHandler_(eh), + hstmt_(hstmt), + column_(col), diff --git a/databases/libodbc++/files/patch-src-datastream.h b/databases/libodbc++/files/patch-src-datastream.h index 8d12037d48b0..a33c0f879f27 100644 --- a/databases/libodbc++/files/patch-src-datastream.h +++ b/databases/libodbc++/files/patch-src-datastream.h @@ -1,5 +1,14 @@ ---- src/datastream.h.orig Wed Jun 2 12:44:31 2004 -+++ src/datastream.h Wed Jun 2 12:51:48 2004 +--- src/datastream.h.orig Mon Apr 21 16:28:38 2003 ++++ src/datastream.h Sun Nov 12 13:36:35 2006 +@@ -49,7 +49,7 @@ + SQLHSTMT hstmt_; + int column_; + int cType_; +- SQLINTEGER& dataStatus_; ++ SQLLEN& dataStatus_; + size_t bufferSize_; + + virtual int underflow(); @@ -63,7 +63,13 @@ return 0; } @@ -15,3 +24,21 @@ if(this->gptr() < 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<char> _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; |