apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tdono...@apache.org
Subject svn commit: r1557720 - in /apr/apr/trunk: CHANGES dbd/apr_dbd_odbc.c include/apr.h.in include/apr.hnw include/apr.hw include/apr.hwc
Date Mon, 13 Jan 2014 13:59:23 GMT
Author: tdonovan
Date: Mon Jan 13 13:59:22 2014
New Revision: 1557720

URL: http://svn.apache.org/r1557720
Log:
Add signed type apr_intptr_t, because intptr_t is C99, and is not 
recognized by MSVC6.  Changed ODBC dbd driver to use apr_intptr_t.

Modified:
    apr/apr/trunk/CHANGES
    apr/apr/trunk/dbd/apr_dbd_odbc.c
    apr/apr/trunk/include/apr.h.in
    apr/apr/trunk/include/apr.hnw
    apr/apr/trunk/include/apr.hw
    apr/apr/trunk/include/apr.hwc

Modified: apr/apr/trunk/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/trunk/CHANGES?rev=1557720&r1=1557719&r2=1557720&view=diff
==============================================================================
--- apr/apr/trunk/CHANGES [utf-8] (original)
+++ apr/apr/trunk/CHANGES [utf-8] Mon Jan 13 13:59:22 2014
@@ -1,6 +1,9 @@
                                                      -*- coding: utf-8 -*-
 Changes for APR 2.0.0
 
+  *) Added signed apr_intptr_t.  Changed ODBC dbd driver to use this.
+     [Tom Donovan]
+
   *) When using shmget-based shared memory, the ID used for ftok is
      now an APR hash of the filename instead of the constant '1'.
      PR 53996 [Jim Jagielski]

Modified: apr/apr/trunk/dbd/apr_dbd_odbc.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/dbd/apr_dbd_odbc.c?rev=1557720&r1=1557719&r2=1557720&view=diff
==============================================================================
--- apr/apr/trunk/dbd/apr_dbd_odbc.c (original)
+++ apr/apr/trunk/dbd/apr_dbd_odbc.c Mon Jan 13 13:59:22 2014
@@ -114,9 +114,9 @@ struct apr_dbd_t
     char lastError[MAX_ERROR_STRING];
     int defaultBufferSize;      /* used for CLOBs in text mode, 
                                  * and when fld size is indeterminate */
-    intptr_t transaction_mode;
-    intptr_t dboptions;         /* driver options re SQLGetData */
-    intptr_t default_transaction_mode;
+    apr_intptr_t transaction_mode;
+    apr_intptr_t dboptions;     /* driver options re SQLGetData */
+    apr_intptr_t default_transaction_mode;
     int can_commit;             /* controls end_trans behavior */
 };
 
@@ -359,7 +359,7 @@ static SQLRETURN odbc_set_result_column(
                                         SQLHANDLE stmt)
 {
     SQLRETURN rc;
-    intptr_t maxsize, textsize, realsize, type, isunsigned = 1;
+    apr_intptr_t maxsize, textsize, realsize, type, isunsigned = 1;
 
     /* discover the sql type */
     rc = SQLColAttribute(stmt, icol + 1, SQL_DESC_UNSIGNED, NULL, 0, NULL,
@@ -747,7 +747,7 @@ static void *odbc_get(const apr_dbd_row_
     SQLRETURN rc;
     SQLLEN indicator;
     int state = row->res->colstate[col];
-    intptr_t options = row->res->apr_dbd->dboptions;
+    apr_intptr_t options = row->res->apr_dbd->dboptions;
 
     switch (state) {
     case (COL_UNAVAIL):
@@ -817,13 +817,13 @@ static apr_status_t odbc_parse_params(ap
                                int *connect, SQLCHAR **datasource, 
                                SQLCHAR **user, SQLCHAR **password, 
                                int *defaultBufferSize, int *nattrs,
-                               int **attrs, intptr_t **attrvals)
+                               int **attrs, apr_intptr_t **attrvals)
 {
     char *seps, *last, *next, *name[MAX_PARAMS], *val[MAX_PARAMS];
     int nparams = 0, i, j;
 
     *attrs = apr_pcalloc(pool, MAX_PARAMS * sizeof(char *));
-    *attrvals = apr_pcalloc(pool, MAX_PARAMS * sizeof(intptr_t));
+    *attrvals = apr_pcalloc(pool, MAX_PARAMS * sizeof(apr_intptr_t));
     *nattrs = 0;
     seps = DEFAULTSEPS;
     name[nparams] = apr_strtok(apr_pstrdup(pool, params), seps, &last);
@@ -1063,7 +1063,7 @@ static apr_dbd_t *odbc_open(apr_pool_t *
     SQLCHAR  *datasource = (SQLCHAR *)"", *user = (SQLCHAR *)"",
              *password = (SQLCHAR *)"";
     int nattrs = 0, *attrs = NULL,  connect = 0;
-    intptr_t *attrvals = NULL;
+    apr_intptr_t *attrvals = NULL;
 
     err_step = "SQLAllocHandle (SQL_HANDLE_DBC)";
     err_htype = SQL_HANDLE_ENV;
@@ -1117,10 +1117,10 @@ static apr_dbd_t *odbc_open(apr_pool_t *
         handle->default_transaction_mode = 0;
         handle->can_commit = APR_DBD_TRANSACTION_IGNORE_ERRORS;
         SQLGetInfo(hdbc, SQL_DEFAULT_TXN_ISOLATION,
-                   &(handle->default_transaction_mode), sizeof(intptr_t), NULL);
+                   &(handle->default_transaction_mode), sizeof(apr_intptr_t), NULL);
         handle->transaction_mode = handle->default_transaction_mode;
         SQLGetInfo(hdbc, SQL_GETDATA_EXTENSIONS ,&(handle->dboptions),
-                   sizeof(intptr_t), NULL);
+                   sizeof(apr_intptr_t), NULL);
         apr_pool_cleanup_register(pool, handle, odbc_close_cleanup, apr_pool_cleanup_null);
         return handle;
     }

Modified: apr/apr/trunk/include/apr.h.in
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr.h.in?rev=1557720&r1=1557719&r2=1557720&view=diff
==============================================================================
--- apr/apr/trunk/include/apr.h.in (original)
+++ apr/apr/trunk/include/apr.h.in Mon Jan 13 13:59:22 2014
@@ -380,8 +380,10 @@ typedef  @ino_t_value@           apr_ino
 
 #if APR_SIZEOF_VOIDP == 8
 typedef  apr_uint64_t            apr_uintptr_t;
+typedef  apr_int64_t             apr_intptr_t;
 #else
 typedef  apr_uint32_t            apr_uintptr_t;
+typedef  apr_int32_t             apr_intptr_t;
 #endif
 
 /* Are we big endian? */

Modified: apr/apr/trunk/include/apr.hnw
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr.hnw?rev=1557720&r1=1557719&r2=1557720&view=diff
==============================================================================
--- apr/apr/trunk/include/apr.hnw (original)
+++ apr/apr/trunk/include/apr.hnw Mon Jan 13 13:59:22 2014
@@ -269,8 +269,10 @@ typedef  apr_uint64_t      apr_ino_t;
 
 #if APR_SIZEOF_VOIDP == 8
 typedef  apr_uint64_t            apr_uintptr_t;
+typedef  apr_int64_t             apr_intptr_t;
 #else
 typedef  apr_uint32_t            apr_uintptr_t;
+typedef  apr_int32_t             apr_intptr_t;
 #endif
 
 /* Mechanisms to properly type numeric literals */

Modified: apr/apr/trunk/include/apr.hw
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr.hw?rev=1557720&r1=1557719&r2=1557720&view=diff
==============================================================================
--- apr/apr/trunk/include/apr.hw (original)
+++ apr/apr/trunk/include/apr.hw Mon Jan 13 13:59:22 2014
@@ -407,8 +407,10 @@ typedef  apr_uint64_t      apr_ino_t;
 
 #if APR_SIZEOF_VOIDP == 8
 typedef  apr_uint64_t            apr_uintptr_t;
+typedef  apr_int64_t             apr_intptr_t;
 #else
 typedef  apr_uint32_t            apr_uintptr_t;
+typedef  apr_int32_t             apr_intptr_t;
 #endif
 
 /* Are we big endian? */

Modified: apr/apr/trunk/include/apr.hwc
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr.hwc?rev=1557720&r1=1557719&r2=1557720&view=diff
==============================================================================
--- apr/apr/trunk/include/apr.hwc (original)
+++ apr/apr/trunk/include/apr.hwc Mon Jan 13 13:59:22 2014
@@ -407,8 +407,10 @@ typedef  apr_uint64_t      apr_ino_t;
 
 #if APR_SIZEOF_VOIDP == 8
 typedef  apr_uint64_t            apr_uintptr_t;
+typedef  apr_int64_t             apr_intptr_t;
 #else
 typedef  apr_uint32_t            apr_uintptr_t;
+typedef  apr_int32_t             apr_intptr_t;
 #endif
 
 /* Are we big endian? */



Mime
View raw message