Fix some 64-bitness issues arising from unixODBC 2.2.14 changes.
diff -up --recursive mysql-connector-odbc-5.2.6-src.orig/driver/utility.c mysql-connector-odbc-5.2.6-src/driver/utility.c
--- mysql-connector-odbc-5.2.6-src.orig/driver/utility.c 2013-09-25 18:59:00.000000000 +0200
+++ mysql-connector-odbc-5.2.6-src/driver/utility.c 2014-01-24 10:30:25.223785969 +0100
@@ -1219,7 +1219,7 @@ SQLLEN fill_display_size_buff(char *buff
{
/* See comment for fill_transfer_oct_len_buff()*/
SQLLEN size= get_display_size(stmt, field);
- sprintf(buff,size == SQL_NO_TOTAL ? "%d" : (sizeof(SQLLEN) == 4 ? "%lu" : "%lld"), size);
+ sprintf(buff, (size == SQL_NO_TOTAL ? "%ld" : "%lu"), size);
return size;
}
@@ -1242,7 +1242,7 @@ SQLLEN fill_transfer_oct_len_buff(char *
*/
SQLLEN len= get_transfer_octet_length(stmt, field);
- sprintf(buff, len == SQL_NO_TOTAL ? "%d" : (sizeof(SQLLEN) == 4 ? "%lu" : "%lld"), len );
+ sprintf(buff, (len == SQL_NO_TOTAL ? "%ld" : "%lu"), len );
return len;
}
@@ -1259,8 +1259,7 @@ SQLLEN fill_transfer_oct_len_buff(char *
SQLULEN fill_column_size_buff(char *buff, STMT *stmt, MYSQL_FIELD *field)
{
SQLULEN size= get_column_size(stmt, field);
- sprintf(buff, (size== SQL_NO_TOTAL ? "%d" :
- (sizeof(SQLULEN) == 4 ? "%lu" : "%llu")), size);
+ sprintf(buff, (size== SQL_NO_TOTAL ? "%ld" : "%lu"), size);
return size;
}
diff -up --recursive mysql-connector-odbc-5.2.6-src.orig/test/my_catalog1.c mysql-connector-odbc-5.2.6-src/test/my_catalog1.c
--- mysql-connector-odbc-5.2.6-src.orig/test/my_catalog1.c 2013-09-25 18:59:00.000000000 +0200
+++ mysql-connector-odbc-5.2.6-src/test/my_catalog1.c 2014-01-24 10:30:25.224785969 +0100
@@ -627,7 +627,7 @@ DECLARE_TEST(t_tables_bug)
printMessage(" Column Name : %s", szColName);
printMessage(" NameLengh : %d", pcbColName);
printMessage(" DataType : %d", pfSqlType);
- printMessage(" ColumnSize : %d", pcbColDef);
+ printMessage(" ColumnSize : %ld", pcbColDef);
printMessage(" DecimalDigits : %d", pibScale);
printMessage(" Nullable : %d", pfNullable);
diff -up --recursive mysql-connector-odbc-5.2.6-src.orig/test/my_cursor.c mysql-connector-odbc-5.2.6-src/test/my_cursor.c
--- mysql-connector-odbc-5.2.6-src.orig/test/my_cursor.c 2013-09-25 18:59:00.000000000 +0200
+++ mysql-connector-odbc-5.2.6-src/test/my_cursor.c 2014-01-24 10:30:25.224785969 +0100
@@ -711,7 +711,7 @@ DECLARE_TEST(t_pos_datetime_delete1)
rc = SQLRowCount(hstmt1,&row_count);
mystmt(hstmt1,rc);
- fprintf(stdout, "rows affected: %d\n", row_count);
+ fprintf(stdout, "rows affected: %ld\n", row_count);
myassert(row_count == 1);
rc = SQLExtendedFetch(hstmt,SQL_FETCH_NEXT,1,NULL,&rgfRowStatus);
@@ -732,7 +732,7 @@ DECLARE_TEST(t_pos_datetime_delete1)
rc = SQLRowCount(hstmt1,&row_count);
mystmt(hstmt1,rc);
- fprintf(stdout, "rows affected: %d\n", row_count);
+ fprintf(stdout, "rows affected: %ld\n", row_count);
myassert(row_count == 1);
SQLFreeStmt(hstmt,SQL_UNBIND);