oracle plugin: Fix type size issue under 64bit systems.
authorFlorian Forster <octo@huhu.verplant.org>
Fri, 27 Feb 2009 13:09:12 +0000 (14:09 +0100)
committerFlorian Forster <octo@huhu.verplant.org>
Fri, 27 Feb 2009 13:09:12 +0000 (14:09 +0100)
Under 64bit systems, `ub4' is of a different size than `size_t', so that a
`(size_t *)' cannot be casted to a `(ub4 *)' automatically.

src/oracle.c

index 324dd4b..78a09ff 100644 (file)
@@ -497,7 +497,7 @@ static int o_read_database_query (o_database_t *db, /* {{{ */
   for (i = 0; i < column_num; i++) /* {{{ */
   {
     char *column_name;
-    size_t column_name_length;
+    ub4 column_name_length;
     OCIParam *oci_param;
 
     oci_param = NULL;
@@ -533,8 +533,8 @@ static int o_read_database_query (o_database_t *db, /* {{{ */
     column_names[i][column_name_length] = 0;
 
     DEBUG ("oracle plugin: o_read_database_query: column_names[%zu] = %s; "
-        "column_name_length = %zu;",
-        i, column_names[i], column_name_length);
+        "column_name_length = %"PRIu32";",
+        i, column_names[i], (uint32_t) column_name_length);
 
     status = OCIDefineByPos (oci_statement,
         &oci_defines[i], oci_error, (ub4) (i + 1),