mirror of
https://github.com/pocoproject/poco.git
synced 2025-02-20 22:31:23 +01:00
unixodbc+linux32 doesn't compile with SQLPOINTER & SQLColAttribute() - old story with ODBC 32/64 API compatibility
This commit is contained in:
parent
4faf23e1e7
commit
e0c971a581
@ -18,14 +18,14 @@
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
@ -73,7 +73,7 @@ namespace Data {
|
||||
namespace ODBC {
|
||||
|
||||
|
||||
#if defined(POCO_PTR_IS_64_BIT)
|
||||
#if defined(POCO_PTR_IS_64_BIT) || defined(POCO_UNIXODBC) // mkrivos - unixodbc+linux32 doesn't compile with SQLPOINTER & SQLColAttribute()
|
||||
typedef SQLLEN* NumAttrPtrType;
|
||||
#else
|
||||
typedef SQLPOINTER NumAttrPtrType;
|
||||
@ -84,9 +84,9 @@ SQLRETURN ODBC_API SQLColAttribute(SQLHSTMT hstmt,
|
||||
SQLUSMALLINT iCol,
|
||||
SQLUSMALLINT iField,
|
||||
SQLPOINTER pCharAttr,
|
||||
SQLSMALLINT cbCharAttrMax,
|
||||
SQLSMALLINT cbCharAttrMax,
|
||||
SQLSMALLINT* pcbCharAttr,
|
||||
NumAttrPtrType pNumAttr);
|
||||
NumAttrPtrType pNumAttr);
|
||||
|
||||
|
||||
SQLRETURN ODBC_API SQLColAttributes(SQLHSTMT hstmt,
|
||||
@ -140,9 +140,9 @@ SQLRETURN ODBC_API SQLGetCursorName(SQLHSTMT hstmt,
|
||||
SQLSMALLINT* pcbCursor);
|
||||
|
||||
SQLRETURN ODBC_API SQLSetDescField(SQLHDESC DescriptorHandle,
|
||||
SQLSMALLINT RecNumber,
|
||||
SQLSMALLINT RecNumber,
|
||||
SQLSMALLINT FieldIdentifier,
|
||||
SQLPOINTER Value,
|
||||
SQLPOINTER Value,
|
||||
SQLINTEGER BufferLength);
|
||||
|
||||
SQLRETURN ODBC_API SQLGetDescField(SQLHDESC hdesc,
|
||||
@ -160,7 +160,7 @@ SQLRETURN ODBC_API SQLGetDescRec(SQLHDESC hdesc,
|
||||
SQLSMALLINT* pfType,
|
||||
SQLSMALLINT* pfSubType,
|
||||
SQLLEN* pLength,
|
||||
SQLSMALLINT* pPrecision,
|
||||
SQLSMALLINT* pPrecision,
|
||||
SQLSMALLINT* pScale,
|
||||
SQLSMALLINT* pNullable);
|
||||
|
||||
@ -360,7 +360,7 @@ SQLRETURN ODBC_API SQLDrivers(SQLHENV henv,
|
||||
SQLSMALLINT* pcbDriverDesc,
|
||||
SQLCHAR* szDriverAttributes,
|
||||
SQLSMALLINT cbDrvrAttrMax,
|
||||
SQLSMALLINT* pcbDrvrAttr);
|
||||
SQLSMALLINT* pcbDrvrAttr);
|
||||
|
||||
|
||||
///
|
||||
@ -376,8 +376,8 @@ inline bool isString(SQLPOINTER pValue, SQLINTEGER length)
|
||||
inline SQLINTEGER stringLength(SQLPOINTER pValue, SQLINTEGER length)
|
||||
{
|
||||
if (SQL_NTS != length) return length;
|
||||
|
||||
return (SQLINTEGER) std::strlen((const char*) pValue);
|
||||
|
||||
return (SQLINTEGER) std::strlen((const char*) pValue);
|
||||
}
|
||||
|
||||
|
||||
@ -392,7 +392,7 @@ inline SQLRETURN SQLColAttribute(SQLHSTMT hstmt,
|
||||
SQLUSMALLINT iCol,
|
||||
SQLUSMALLINT iField,
|
||||
SQLPOINTER pCharAttr,
|
||||
SQLSMALLINT cbCharAttrMax,
|
||||
SQLSMALLINT cbCharAttrMax,
|
||||
SQLSMALLINT* pcbCharAttr,
|
||||
NumAttrPtrType pNumAttr)
|
||||
{
|
||||
@ -400,7 +400,7 @@ inline SQLRETURN SQLColAttribute(SQLHSTMT hstmt,
|
||||
iCol,
|
||||
iField,
|
||||
pCharAttr,
|
||||
cbCharAttrMax,
|
||||
cbCharAttrMax,
|
||||
pcbCharAttr,
|
||||
pNumAttr);
|
||||
}
|
||||
@ -510,15 +510,15 @@ inline SQLRETURN SQLGetCursorName(SQLHSTMT hstmt,
|
||||
|
||||
|
||||
inline SQLRETURN SQLSetDescField(SQLHDESC DescriptorHandle,
|
||||
SQLSMALLINT RecNumber,
|
||||
SQLSMALLINT RecNumber,
|
||||
SQLSMALLINT FieldIdentifier,
|
||||
SQLPOINTER Value,
|
||||
SQLPOINTER Value,
|
||||
SQLINTEGER BufferLength)
|
||||
{
|
||||
return ::SQLSetDescField(DescriptorHandle,
|
||||
RecNumber,
|
||||
RecNumber,
|
||||
FieldIdentifier,
|
||||
Value,
|
||||
Value,
|
||||
BufferLength);
|
||||
}
|
||||
|
||||
@ -547,7 +547,7 @@ inline SQLRETURN SQLGetDescRec(SQLHDESC hdesc,
|
||||
SQLSMALLINT* pfType,
|
||||
SQLSMALLINT* pfSubType,
|
||||
SQLLEN* pLength,
|
||||
SQLSMALLINT* pPrecision,
|
||||
SQLSMALLINT* pPrecision,
|
||||
SQLSMALLINT* pScale,
|
||||
SQLSMALLINT* pNullable)
|
||||
{
|
||||
@ -559,7 +559,7 @@ inline SQLRETURN SQLGetDescRec(SQLHDESC hdesc,
|
||||
pfType,
|
||||
pfSubType,
|
||||
pLength,
|
||||
pPrecision,
|
||||
pPrecision,
|
||||
pScale,
|
||||
pNullable);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user