summaryrefslogtreecommitdiffstats
path: root/myodbc/myodbc-64bit.patch
diff options
context:
space:
mode:
authortnut <tnut at nutyx dot com>2012-01-08 12:15:45 +0100
committertnut <tnut at nutyx dot com>2012-01-08 12:15:45 +0100
commit3f57a7f93b3e7550cbd73036f6a56654e17d1d5c (patch)
tree819b14ab0377fe2054fe59866669d904e9e0b4b5 /myodbc/myodbc-64bit.patch
parentc9972ec7f32bf9d37388e853fe9bf633e242d05a (diff)
downloadnutyx-extra-3f57a7f93b3e7550cbd73036f6a56654e17d1d5c.tar.gz
nutyx-extra-3f57a7f93b3e7550cbd73036f6a56654e17d1d5c.tar.bz2
nutyx-extra-3f57a7f93b3e7550cbd73036f6a56654e17d1d5c.tar.xz
nutyx-extra-3f57a7f93b3e7550cbd73036f6a56654e17d1d5c.zip
split de git pakxe et NuTyX-extra
Diffstat (limited to 'myodbc/myodbc-64bit.patch')
-rw-r--r--myodbc/myodbc-64bit.patch85
1 files changed, 85 insertions, 0 deletions
diff --git a/myodbc/myodbc-64bit.patch b/myodbc/myodbc-64bit.patch
new file mode 100644
index 000000000..ac62d816a
--- /dev/null
+++ b/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);