You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by bo...@apache.org on 2008/06/13 11:25:06 UTC

svn commit: r667437 - /apr/apr-util/branches/1.3.x/dbd/apr_dbd.c

Author: bojan
Date: Fri Jun 13 02:25:06 2008
New Revision: 667437

URL: http://svn.apache.org/viewvc?rev=667437&view=rev
Log:
Backport part of r667182 from the trunk.
Only use mutexes on if DSO is enabled.

Modified:
    apr/apr-util/branches/1.3.x/dbd/apr_dbd.c

Modified: apr/apr-util/branches/1.3.x/dbd/apr_dbd.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/dbd/apr_dbd.c?rev=667437&r1=667436&r2=667437&view=diff
==============================================================================
--- apr/apr-util/branches/1.3.x/dbd/apr_dbd.c (original)
+++ apr/apr-util/branches/1.3.x/dbd/apr_dbd.c Fri Jun 13 02:25:06 2008
@@ -97,10 +97,10 @@
     /* Top level pool scope, need process-scope lifetime */
     for (parent = pool;  parent; parent = apr_pool_parent_get(pool))
          pool = parent;
-
+#if APU_DSO_BUILD
     /* deprecate in 2.0 - permit implicit initialization */
     apu_dso_init(pool);
-
+#endif
     drivers = apr_hash_make(pool);
 
 #if APR_HAS_THREADS
@@ -128,6 +128,9 @@
 #if APU_HAVE_FREETDS
     DRIVER_LOAD("freetds", apr_dbd_freetds_driver, pool);
 #endif
+#if APU_HAVE_ODBC
+    DRIVER_LOAD("odbc", apr_dbd_odbc_driver, pool);
+#endif
 #if APU_HAVE_SOME_OTHER_BACKEND
     DRIVER_LOAD("firebird", apr_dbd_other_driver, pool);
 #endif
@@ -149,14 +152,17 @@
 #endif
     apr_status_t rv;
 
+#if APU_DSO_BUILD
     rv = apu_dso_mutex_lock();
     if (rv) {
         return rv;
     }
-
+#endif
     *driver = apr_hash_get(drivers, name, APR_HASH_KEY_STRING);
     if (*driver) {
+#if APU_DSO_BUILD
         apu_dso_mutex_unlock();
+#endif
         return APR_SUCCESS;
     }