diff options
author | tnut <tnut at nutyx dot com> | 2011-05-05 10:12:28 +0200 |
---|---|---|
committer | tnut <tnut at nutyx dot com> | 2011-05-05 10:12:28 +0200 |
commit | 813285ad26660212791e7a68e0f5ec4203ac46ad (patch) | |
tree | c3ae40c9be101d75cb12e7a3b390917fdfee4f81 /extra/myodbc/myodbc-64bit.patch | |
parent | 1de0c182c9368a85c49bffa159311db506777f20 (diff) | |
parent | 3a2975052e2e4750117b0bcfc3b954999c35c1f7 (diff) | |
download | nutyx-extra-813285ad26660212791e7a68e0f5ec4203ac46ad.tar.gz nutyx-extra-813285ad26660212791e7a68e0f5ec4203ac46ad.tar.bz2 nutyx-extra-813285ad26660212791e7a68e0f5ec4203ac46ad.tar.xz nutyx-extra-813285ad26660212791e7a68e0f5ec4203ac46ad.zip |
Merge branch 'master' of ssh://kiao.no-ip.info:443/~/pakxe
Diffstat (limited to 'extra/myodbc/myodbc-64bit.patch')
-rw-r--r-- | extra/myodbc/myodbc-64bit.patch | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/extra/myodbc/myodbc-64bit.patch b/extra/myodbc/myodbc-64bit.patch new file mode 100644 index 000000000..ac62d816a --- /dev/null +++ b/extra/myodbc/myodbc-64bit.patch @@ -0,0 +1,85 @@ +Fix some 64-bitness issues arising from unixODBC 2.2.14 changes. + + +diff -Naur mysql-connector-odbc-5.1.8.orig/driver/utility.c mysql-connector-odbc-5.1.8/driver/utility.c +--- mysql-connector-odbc-5.1.8.orig/driver/utility.c 2010-10-28 14:33:18.000000000 -0400 ++++ mysql-connector-odbc-5.1.8/driver/utility.c 2010-12-23 17:15:37.516602586 -0500 +@@ -1205,7 +1205,7 @@ + { + /* 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; + } +@@ -1228,7 +1228,7 @@ + */ + 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; + } +@@ -1245,8 +1245,7 @@ + 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 -Naur mysql-connector-odbc-5.1.8.orig/test/my_catalog.c mysql-connector-odbc-5.1.8/test/my_catalog.c +--- mysql-connector-odbc-5.1.8.orig/test/my_catalog.c 2010-10-28 14:33:18.000000000 -0400 ++++ mysql-connector-odbc-5.1.8/test/my_catalog.c 2010-12-23 17:16:26.284605944 -0500 +@@ -599,7 +599,7 @@ + fprintf(stdout, "# Column Name : %s\n", szColName); + fprintf(stdout, "# NameLengh : %d\n", pcbColName); + fprintf(stdout, "# DataType : %d\n", pfSqlType); +- fprintf(stdout, "# ColumnSize : %d\n", pcbColDef); ++ fprintf(stdout, "# ColumnSize : %ld\n", pcbColDef); + fprintf(stdout, "# DecimalDigits : %d\n", pibScale); + fprintf(stdout, "# Nullable : %d\n", pfNullable); + +@@ -632,7 +632,7 @@ + + rc = SQLGetConnectAttr(hdbc, SQL_ATTR_CURRENT_CATALOG, db, sizeof(db), &len); + mycon(hdbc,rc); +- fprintf(stdout,"current_catalog: %s (%ld)\n", db, len); ++ fprintf(stdout,"current_catalog: %s (%d)\n", db, len); + is_num(len, 4); + is_str(db, "test", 5); + +@@ -653,7 +653,7 @@ + + rc = SQLGetConnectAttr(hdbc, SQL_ATTR_CURRENT_CATALOG, db, 255, &len); + mycon(hdbc,rc); +- fprintf(stdout,"current_catalog: %s (%ld)\n", db, len); ++ fprintf(stdout,"current_catalog: %s (%d)\n", db, len); + is_num(len, 17); + is_str(db, cur_db, 18); + +diff -Naur mysql-connector-odbc-5.1.8.orig/test/my_cursor.c mysql-connector-odbc-5.1.8/test/my_cursor.c +--- mysql-connector-odbc-5.1.8.orig/test/my_cursor.c 2010-10-28 14:33:18.000000000 -0400 ++++ mysql-connector-odbc-5.1.8/test/my_cursor.c 2010-12-23 17:12:16.632676933 -0500 +@@ -711,7 +711,7 @@ + + 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 @@ + + 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); |