Changeset: db55d57cb882 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=db55d57cb882
Modified Files:
        clients/odbc/driver/SQLForeignKeys.c
        clients/odbc/driver/SQLPrimaryKeys.c
        clients/odbc/driver/SQLSpecialColumns.c
        clients/odbc/driver/SQLStatistics.c
        configure.ag
        gdk/gdk.mx
Branch: default
Log Message:

Merge with Mar2011 branch.


diffs (truncated from 1102 to 300 lines):

diff --git a/clients/odbc/driver/ODBCConvert.c 
b/clients/odbc/driver/ODBCConvert.c
--- a/clients/odbc/driver/ODBCConvert.c
+++ b/clients/odbc/driver/ODBCConvert.c
@@ -1323,7 +1323,10 @@
                        }
                        data = (char *) ptr;
 
-                       sz = snprintf(data, buflen, "%04hu-%02hu-%02hu", 
dval.year, dval.month, dval.day);
+                       sz = snprintf(data, buflen, "%04u-%02u-%02u",
+                                     (unsigned int) dval.year,
+                                     (unsigned int) dval.month,
+                                     (unsigned int) dval.day);
                        if (sz < 0 || sz >= buflen) {
                                data[buflen - 1] = 0;
                                /* String data, right-truncated */
@@ -1345,7 +1348,10 @@
                        }
                        data = (char *) ptr;
 
-                       sz = snprintf(data, buflen, "%02hu:%02hu:%02hu", 
tval.hour, tval.minute, tval.second);
+                       sz = snprintf(data, buflen, "%02u:%02u:%02u",
+                                     (unsigned int) tval.hour,
+                                     (unsigned int) tval.minute,
+                                     (unsigned int) tval.second);
                        if (sz < 0 || sz >= buflen) {
                                data[buflen - 1] = 0;
                                /* String data, right-truncated */
@@ -1357,7 +1363,14 @@
                case SQL_TYPE_TIMESTAMP:
                        data = (char *) ptr;
 
-                       sz = snprintf(data, buflen, "%04hu-%02hu-%02hu 
%02hu:%02hu:%02hu", tsval.year, tsval.month, tsval.day, tsval.hour, 
tsval.minute, tsval.second);
+                       sz = snprintf(data, buflen,
+                                     "%04u-%02u-%02u %02u:%02u:%02u",
+                                     (unsigned int) tsval.year,
+                                     (unsigned int) tsval.month,
+                                     (unsigned int) tsval.day,
+                                     (unsigned int) tsval.hour,
+                                     (unsigned int) tsval.minute,
+                                     (unsigned int) tsval.second);
                        if (sz < 0 || sz >= buflen) {
                                /* Numeric value out of range */
                                addStmtError(stmt, "22003", NULL, 0);
@@ -1382,7 +1395,8 @@
                                if (lenp)
                                        *lenp += fscale + 1;
                                if (buflen > 2)
-                                       sz = snprintf(data, buflen, ".%0*u", 
fscale, (unsigned int) tsval.fraction);
+                                       sz = snprintf(data, buflen, ".%0*u",
+                                                     fscale, (unsigned int) 
tsval.fraction);
                                if (buflen <= 2 || sz < 0 || sz >= buflen) {
                                        data[buflen - 1] = 0;
                                        /* String data, right-truncated */
@@ -2687,15 +2701,28 @@
                        break;
                }
                case SQL_C_TYPE_DATE:
-                       snprintf(data, sizeof(data), "%04hd-%02hu-%02hu", 
dval.year, dval.month, dval.day);
+                       snprintf(data, sizeof(data), "%04d-%02u-%02u",
+                                (int) dval.year,
+                                (unsigned int) dval.month,
+                                (unsigned int) dval.day);
                        assigns(buf, bufpos, buflen, data, stmt);
                        break;
                case SQL_C_TYPE_TIME:
-                       snprintf(data, sizeof(data), "%02hu:%02hu:%02hu", 
tval.hour, tval.minute, tval.second);
+                       snprintf(data, sizeof(data), "%02u:%02u:%02u",
+                                (unsigned int) tval.hour,
+                                (unsigned int) tval.minute,
+                                (unsigned int) tval.second);
                        assigns(buf, bufpos, buflen, data, stmt);
                        break;
                case SQL_C_TYPE_TIMESTAMP:
-                       snprintf(data, sizeof(data), "%04hd-%02hu-%02hu 
%02hu:%02hu:%02hu", tsval.year, tsval.month, tsval.day, tsval.hour, 
tsval.minute, tsval.second);
+                       snprintf(data, sizeof(data),
+                                "%04d-%02u-%02u %02u:%02u:%02u",
+                                (int) tsval.year,
+                                (unsigned int) tsval.month,
+                                (unsigned int) tsval.day,
+                                (unsigned int) tsval.hour,
+                                (unsigned int) tsval.minute,
+                                (unsigned int) tsval.second);
                        assigns(buf, bufpos, buflen, data, stmt);
                        if (tsval.fraction) {
                                snprintf(data, sizeof(data), ".%09u", (unsigned 
int) tsval.fraction);
@@ -2826,7 +2853,7 @@
                        }
                        /* fall through */
                case SQL_C_TYPE_DATE:
-                       snprintf(data, sizeof(data), "DATE '%hu-%02hu-%02hu'", 
dval.year, dval.month, dval.day);
+                       snprintf(data, sizeof(data), "DATE '%u-%02u-%02u'", 
dval.year, dval.month, dval.day);
                        assigns(buf, bufpos, buflen, data, stmt);
                        break;
                default:
@@ -2862,7 +2889,10 @@
                        }
                        /* fall through */
                case SQL_C_TYPE_TIME:
-                       snprintf(data, sizeof(data), "TIME '%hu:%02hu:%02hu'", 
tval.hour, tval.minute, tval.second);
+                       snprintf(data, sizeof(data), "TIME '%u:%02u:%02u'",
+                                (unsigned int) tval.hour,
+                                (unsigned int) tval.minute,
+                                (unsigned int) tval.second);
                        assigns(buf, bufpos, buflen, data, stmt);
                        break;
                default:
@@ -2921,7 +2951,14 @@
                        }
                        /* fall through */
                case SQL_C_TYPE_TIMESTAMP:
-                       snprintf(data, sizeof(data), "TIMESTAMP 
'%hu-%02hd-%02hd %02hu:%02hu:%02hu", tsval.year, tsval.month, tsval.day, 
tsval.hour, tsval.minute, tsval.second);
+                       snprintf(data, sizeof(data),
+                                "TIMESTAMP '%u-%02d-%02d %02u:%02u:%02u",
+                                (unsigned int) tsval.year,
+                                (unsigned int) tsval.month,
+                                (unsigned int) tsval.day,
+                                (unsigned int) tsval.hour,
+                                (unsigned int) tsval.minute,
+                                (unsigned int) tsval.second);
                        assigns(buf, bufpos, buflen, data, stmt);
                        if (tsval.fraction) {
                                snprintf(data, sizeof(data), ".%09u", (unsigned 
int) tsval.fraction);
diff --git a/clients/odbc/driver/SQLAllocHandle.c 
b/clients/odbc/driver/SQLAllocHandle.c
--- a/clients/odbc/driver/SQLAllocHandle.c
+++ b/clients/odbc/driver/SQLAllocHandle.c
@@ -55,7 +55,7 @@
        }
        *pnOutputHandle = (SQLHANDLE *) newODBCEnv();
 #ifdef ODBCDEBUG
-       ODBCLOG("new env " PTRFMT "\n", PTRFMTCAST * pnOutputHandle);
+       ODBCLOG("new env " PTRFMT "\n", PTRFMTCAST *pnOutputHandle);
 #endif
        return *pnOutputHandle == NULL ? SQL_ERROR : SQL_SUCCESS;
 }
@@ -76,7 +76,7 @@
        }
        *pnOutputHandle = (SQLHANDLE *) newODBCDbc(env);
 #ifdef ODBCDEBUG
-       ODBCLOG("new dbc " PTRFMT "\n", PTRFMTCAST * pnOutputHandle);
+       ODBCLOG("new dbc " PTRFMT "\n", PTRFMTCAST *pnOutputHandle);
 #endif
        return *pnOutputHandle == NULL ? SQL_ERROR : SQL_SUCCESS;
 }
@@ -97,7 +97,7 @@
        }
        *pnOutputHandle = (SQLHANDLE *) newODBCStmt(dbc);
 #ifdef ODBCDEBUG
-       ODBCLOG("new stmt " PTRFMT "\n", PTRFMTCAST * pnOutputHandle);
+       ODBCLOG("new stmt " PTRFMT "\n", PTRFMTCAST *pnOutputHandle);
 #endif
        return *pnOutputHandle == NULL ? SQL_ERROR : SQL_SUCCESS;
 }
@@ -118,7 +118,7 @@
        }
        *pnOutputHandle = (SQLHANDLE *) newODBCDesc(dbc);
 #ifdef ODBCDEBUG
-       ODBCLOG("new desc " PTRFMT "\n", PTRFMTCAST * pnOutputHandle);
+       ODBCLOG("new desc " PTRFMT "\n", PTRFMTCAST *pnOutputHandle);
 #endif
        return *pnOutputHandle == NULL ? SQL_ERROR : SQL_SUCCESS;
 }
diff --git a/clients/odbc/driver/SQLBindCol.c b/clients/odbc/driver/SQLBindCol.c
--- a/clients/odbc/driver/SQLBindCol.c
+++ b/clients/odbc/driver/SQLBindCol.c
@@ -52,7 +52,9 @@
        ODBCDesc *desc;         /* Application Row Descriptor */
 
 #ifdef ODBCDEBUG
-       ODBCLOG("SQLBindCol " PTRFMT " %d %d " LENFMT "\n", PTRFMTCAST hStmt, 
nCol, nTargetType, LENCAST nTargetValueMax);
+       ODBCLOG("SQLBindCol " PTRFMT " %d %d " LENFMT "\n",
+               PTRFMTCAST hStmt, nCol, (int) nTargetType,
+               LENCAST nTargetValueMax);
 #endif
 
        if (!isValidStmt(stmt))
diff --git a/clients/odbc/driver/SQLBindParameter.c 
b/clients/odbc/driver/SQLBindParameter.c
--- a/clients/odbc/driver/SQLBindParameter.c
+++ b/clients/odbc/driver/SQLBindParameter.c
@@ -256,7 +256,10 @@
                 SQLLEN BufferLength, SQLLEN *StrLen_or_IndPtr)
 {
 #ifdef ODBCDEBUG
-       ODBCLOG("SQLBindParameter " PTRFMT " %hd %hd %hd %hd " ULENFMT " 
%hd\n", PTRFMTCAST hStmt, ParameterNumber, InputOutputType, ValueType, 
ParameterType, ULENCAST ColumnSize, DecimalDigits);
+       ODBCLOG("SQLBindParameter " PTRFMT " %u %d %d %d " ULENFMT " %d\n",
+               PTRFMTCAST hStmt, (unsigned int) ParameterNumber,
+               (int) InputOutputType, (int) ValueType, (int) ParameterType,
+               ULENCAST ColumnSize, (int) DecimalDigits);
 #endif
 
        return SQLBindParameter_((ODBCStmt *) hStmt, ParameterNumber, 
InputOutputType, ValueType, ParameterType, ColumnSize, DecimalDigits, 
ParameterValuePtr, BufferLength, StrLen_or_IndPtr);
diff --git a/clients/odbc/driver/SQLBulkOperations.c 
b/clients/odbc/driver/SQLBulkOperations.c
--- a/clients/odbc/driver/SQLBulkOperations.c
+++ b/clients/odbc/driver/SQLBulkOperations.c
@@ -47,7 +47,8 @@
        ODBCStmt *stmt = (ODBCStmt *) hStmt;
 
 #ifdef ODBCDEBUG
-       ODBCLOG("SQLBulkOperations " PTRFMT " %d\n", PTRFMTCAST hStmt, 
nOperation);
+       ODBCLOG("SQLBulkOperations " PTRFMT " %d\n",
+               PTRFMTCAST hStmt, (int) nOperation);
 #endif
 
        if (!isValidStmt(stmt))
diff --git a/clients/odbc/driver/SQLColAttribute.c 
b/clients/odbc/driver/SQLColAttribute.c
--- a/clients/odbc/driver/SQLColAttribute.c
+++ b/clients/odbc/driver/SQLColAttribute.c
@@ -209,7 +209,8 @@
                LENP_OR_POINTER_T pnValue)
 {
 #ifdef ODBCDEBUG
-       ODBCLOG("SQLColAttribute " PTRFMT " %d\n", PTRFMTCAST hStmt, 
nFieldIdentifier);
+       ODBCLOG("SQLColAttribute " PTRFMT " %u\n",
+               PTRFMTCAST hStmt, (unsigned int) nFieldIdentifier);
 #endif
 
        if (!isValidStmt((ODBCStmt *) hStmt))
@@ -248,7 +249,8 @@
        SQLSMALLINT n;
 
 #ifdef ODBCDEBUG
-       ODBCLOG("SQLColAttributeW " PTRFMT " %d\n", PTRFMTCAST hStmt, 
nFieldIdentifier);
+       ODBCLOG("SQLColAttributeW " PTRFMT " %u\n",
+               PTRFMTCAST hStmt, (unsigned int) nFieldIdentifier);
 #endif
 
        if (!isValidStmt(stmt))
diff --git a/clients/odbc/driver/SQLColAttributes.c 
b/clients/odbc/driver/SQLColAttributes.c
--- a/clients/odbc/driver/SQLColAttributes.c
+++ b/clients/odbc/driver/SQLColAttributes.c
@@ -89,7 +89,8 @@
        ODBCStmt *stmt = (ODBCStmt *) hStmt;
 
 #ifdef ODBCDEBUG
-       ODBCLOG("SQLColAttributes " PTRFMT " %d %d\n", PTRFMTCAST hStmt, nCol, 
nDescType);
+       ODBCLOG("SQLColAttributes " PTRFMT " %u %u\n", PTRFMTCAST hStmt,
+               (unsigned int) nCol, (unsigned int) nDescType);
 #endif
 
        if (!isValidStmt(stmt))
@@ -128,7 +129,8 @@
        SQLSMALLINT n;
 
 #ifdef ODBCDEBUG
-       ODBCLOG("SQLColAttributesW " PTRFMT " %d %d\n", PTRFMTCAST hStmt, nCol, 
nDescType);
+       ODBCLOG("SQLColAttributesW " PTRFMT " %u %u\n", PTRFMTCAST hStmt,
+               (unsigned int) nCol, (unsigned int) nDescType);
 #endif
 
        if (!isValidStmt(stmt))
diff --git a/clients/odbc/driver/SQLColumnPrivileges.c 
b/clients/odbc/driver/SQLColumnPrivileges.c
--- a/clients/odbc/driver/SQLColumnPrivileges.c
+++ b/clients/odbc/driver/SQLColumnPrivileges.c
@@ -57,7 +57,11 @@
        fixODBCstring(szColumnName, nColumnNameLength, SQLSMALLINT, 
addStmtError, stmt, return SQL_ERROR);
 
 #ifdef ODBCDEBUG
-       ODBCLOG(" \"%.*s\" \"%.*s\" \"%.*s\" \"%.*s\"\n", nCatalogNameLength, 
(char*)szCatalogName, nSchemaNameLength, (char*)szSchemaName, nTableNameLength, 
(char*)szTableName, nColumnNameLength, (char*)szColumnName);
+       ODBCLOG(" \"%.*s\" \"%.*s\" \"%.*s\" \"%.*s\"\n",
+               (int) nCatalogNameLength, (char *) szCatalogName,
+               (int) nSchemaNameLength, (char *) szSchemaName,
+               (int) nTableNameLength, (char *) szTableName,
+               (int) nColumnNameLength, (char *) szColumnName);
 #endif
 
        /* SQLColumnPrivileges returns a table with the following columns:
diff --git a/clients/odbc/driver/SQLColumns.c b/clients/odbc/driver/SQLColumns.c
--- a/clients/odbc/driver/SQLColumns.c
+++ b/clients/odbc/driver/SQLColumns.c
@@ -109,7 +109,11 @@
        fixODBCstring(szColumnName, nColumnNameLength, SQLSMALLINT, 
addStmtError, stmt, return SQL_ERROR);
 
 #ifdef ODBCDEBUG
-       ODBCLOG(" \"%.*s\" \"%.*s\" \"%.*s\" \"%.*s\"\n", nCatalogNameLength, 
(char*)szCatalogName, nSchemaNameLength, (char*)szSchemaName, nTableNameLength, 
(char*)szTableName, nColumnNameLength, (char*)szColumnName);
+       ODBCLOG(" \"%.*s\" \"%.*s\" \"%.*s\" \"%.*s\"\n",
+               (int) nCatalogNameLength, (char *) szCatalogName,
+               (int) nSchemaNameLength, (char *) szSchemaName,
+               (int) nTableNameLength, (char *) szTableName,
+               (int) nColumnNameLength, (char *) szColumnName);
 #endif
 
        /* construct the query now */
diff --git a/clients/odbc/driver/SQLConnect.c b/clients/odbc/driver/SQLConnect.c
--- a/clients/odbc/driver/SQLConnect.c
+++ b/clients/odbc/driver/SQLConnect.c
@@ -154,7 +154,9 @@
        }
 
 #ifdef ODBCDEBUG
-       ODBCLOG("SQLConnect: DSN=%s UID=%s PWD=%s host=%s port=%d 
database=%s\n", dsn ? dsn : "(null)", uid, pwd, host, port, schema ? schema : 
"(null)");
+       ODBCLOG("SQLConnect: DSN=%s UID=%s PWD=%s host=%s port=%d 
database=%s\n",
+               dsn ? dsn : "(null)", uid, pwd, host, port,
+               schema ? schema : "(null)");
 #endif
 
        /* connect to a server on host via port */
diff --git a/clients/odbc/driver/SQLCopyDesc.c 
b/clients/odbc/driver/SQLCopyDesc.c
--- a/clients/odbc/driver/SQLCopyDesc.c
+++ b/clients/odbc/driver/SQLCopyDesc.c
@@ -50,7 +50,8 @@
        ODBCDesc *dst = (ODBCDesc *) hTargetDescHandle;
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to