summaryrefslogtreecommitdiffstats
path: root/extra/myodbc/myodbc-64bit.patch
diff options
context:
space:
mode:
authorsibel <lesibel@free.fr>2011-05-04 12:28:12 +0200
committersibel <lesibel@free.fr>2011-05-04 12:28:12 +0200
commitf193c4927be2dad20a283de5ed65bf2109f2beb0 (patch)
treeba97eaffc87a4d9173f6e9ed154c92e1ed54648c /extra/myodbc/myodbc-64bit.patch
parent031efac68c7c64830286ae647c037d420a200e69 (diff)
downloadnutyx-extra-f193c4927be2dad20a283de5ed65bf2109f2beb0.tar.gz
nutyx-extra-f193c4927be2dad20a283de5ed65bf2109f2beb0.tar.bz2
nutyx-extra-f193c4927be2dad20a283de5ed65bf2109f2beb0.tar.xz
nutyx-extra-f193c4927be2dad20a283de5ed65bf2109f2beb0.zip
myodbc 5.1.8-1 correction port
Diffstat (limited to 'extra/myodbc/myodbc-64bit.patch')
-rw-r--r--extra/myodbc/myodbc-64bit.patch85
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);