*** configure.ac.orig Mon Aug 10 22:52:25 2009 --- configure.ac Mon Aug 10 23:08:05 2009 *************** *** 69,74 **** --- 69,90 ---- [Define to 1 to build with unixODBC support]) AC_DEFINE(SQL_WCHART_CONVERT, [], [Define to use wchar_t as SQLWCHAR in unixODBC]) + AC_CACHE_CHECK([unixODBC SQLLEN must be version 2.2.14 ], + func_sqlcolattribute_sqllen, + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#include > + SQLRETURN SQL_API SQLColAttribute + (SQLHSTMT StatementHandle,SQLUSMALLINT ColumnNumber, + SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttribute, + SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, + SQLLEN *NumercAttribute);]], + [[]])], + func_sqlcolattribute_sqllen=yes, + func_sqlcolattribute_sqllen=no)]) + if test $func_sqlcolattribute_sqllen = yes; then + AC_DEFINE(SQLCOLATTRIBUTE_SQLLEN, 1, + [Define to 1 if SQLColAttribute use SQLLEN]) + fi fi *** odbcapi30.c.orig Mon Aug 10 23:02:40 2009 --- odbcapi30.c Mon Aug 10 23:05:35 2009 *************** *** 118,129 **** SQLPOINTER CharacterAttribute, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, ! #if defined(_WIN64) SQLLEN *NumericAttribute - #elif defined(WITH_UNIXODBC) || defined(WIN32) - SQLPOINTER NumericAttribute #else ! SQLLEN *NumericAttribute #endif ) { --- 118,127 ---- SQLPOINTER CharacterAttribute, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, ! #if defined(_WIN64) || defined(SQLCOLATTRIBUTE_SQLLEN) SQLLEN *NumericAttribute #else ! SQLPOINTER NumericAttribute #endif ) { *** odbcapi30w.c.orig Mon Aug 10 23:06:18 2009 --- odbcapi30w.c Mon Aug 10 23:07:29 2009 *************** *** 262,271 **** SQLPOINTER pCharAttr, SQLSMALLINT cbCharAttrMax, SQLSMALLINT *pcbCharAttr, ! #if defined(WITH_UNIXODBC) || (defined(WIN32) && ! defined(_WIN64)) ! SQLPOINTER pNumAttr ! #else SQLLEN *pNumAttr #endif ) { --- 262,271 ---- SQLPOINTER pCharAttr, SQLSMALLINT cbCharAttrMax, SQLSMALLINT *pcbCharAttr, ! #if defined(_WIN64) || defined(SQLCOLATTRIBUTE_SQLLEN) SQLLEN *pNumAttr + #else + SQLPOINTER pNumAttr #endif ) {