Fix build on 64-bit arches (amd64).
Pointed out by: kris (via pointyhat)
This commit is contained in:
parent
9c07813ee3
commit
972df48076
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=177098
7 changed files with 136 additions and 2 deletions
11
databases/libodbc++/files/patch-src-datahandler.cpp
Normal file
11
databases/libodbc++/files/patch-src-datahandler.cpp
Normal file
|
@ -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++) {
|
25
databases/libodbc++/files/patch-src-datahandler.h
Normal file
25
databases/libodbc++/files/patch-src-datahandler.h
Normal file
|
@ -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_];
|
||||
}
|
||||
|
29
databases/libodbc++/files/patch-src-datastream.cpp
Normal file
29
databases/libodbc++/files/patch-src-datastream.cpp
Normal file
|
@ -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),
|
|
@ -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())
|
||||
|
|
11
databases/libodbc++/files/patch-src-preparedstatement.cpp
Normal file
11
databases/libodbc++/files/patch-src-preparedstatement.cpp
Normal file
|
@ -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;
|
||||
|
20
databases/libodbc++/files/patch-src-resultsetmetadata.cpp
Normal file
20
databases/libodbc++/files/patch-src-resultsetmetadata.cpp
Normal file
|
@ -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=
|
11
databases/libodbc++/files/patch-src-statement.cpp
Normal file
11
databases/libodbc++/files/patch-src-statement.cpp
Normal file
|
@ -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;
|
Loading…
Reference in a new issue