apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fua...@apache.org
Subject svn commit: r553027 - in /apr/apr-util/trunk: dbd/apr_dbd.c include/apu.h.in include/apu.hnw include/apu.hw
Date Wed, 04 Jul 2007 00:36:37 GMT
Author: fuankg
Date: Tue Jul  3 17:36:35 2007
New Revision: 553027

URL: http://svn.apache.org/viewvc?view=rev&rev=553027
Log:
added define APU_DBD_DRIVER_FMT to apu.h which sets the driver format to build the DSO name;
removed the ifdefs from apr_dbd.c; used apr_snprintf() also for symbol.

Modified:
    apr/apr-util/trunk/dbd/apr_dbd.c
    apr/apr-util/trunk/include/apu.h.in
    apr/apr-util/trunk/include/apu.hnw
    apr/apr-util/trunk/include/apu.hw

Modified: apr/apr-util/trunk/dbd/apr_dbd.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/dbd/apr_dbd.c?view=diff&rev=553027&r1=553026&r2=553027
==============================================================================
--- apr/apr-util/trunk/dbd/apr_dbd.c (original)
+++ apr/apr-util/trunk/dbd/apr_dbd.c Tue Jul  3 17:36:35 2007
@@ -150,19 +150,13 @@
     /* The driver DSO must have exactly the same lifetime as the
      * drivers hash table; ignore the passed-in pool */
     pool = apr_hash_pool_get(drivers);
-
-#ifdef WIN32
-    sprintf(path, "apr_dbd_%s.dll", name);
-#elif defined(NETWARE)
-    apr_snprintf(path, sizeof path, "dbd%s.nlm", name);
-#else
-    apr_snprintf(path, sizeof path, APU_DSO_LIBDIR "/apr_dbd_%s.so", name);
-#endif
+    /* APU_DBD_DRIVER_FMT is defined in apu.h */
+    apr_snprintf(path, sizeof path, APU_DBD_DRIVER_FMT, name);
     rv = apr_dso_load(&dlhandle, path, pool);
     if (rv != APR_SUCCESS) { /* APR_EDSOOPEN */
         goto unlock;
     }
-    sprintf(path, "apr_dbd_%s_driver", name);
+    apr_snprintf(path, sizeof path, "apr_dbd_%s_driver", name);
     rv = apr_dso_sym(&symbol, dlhandle, path);
     if (rv != APR_SUCCESS) { /* APR_ESYMNOTFOUND */
         apr_dso_unload(dlhandle);

Modified: apr/apr-util/trunk/include/apu.h.in
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/include/apu.h.in?view=diff&rev=553027&r1=553026&r2=553027
==============================================================================
--- apr/apr-util/trunk/include/apu.h.in (original)
+++ apr/apr-util/trunk/include/apu.h.in Tue Jul  3 17:36:35 2007
@@ -88,5 +88,7 @@
 #define APU_HAVE_ICONV         @have_iconv@
 #define APR_HAS_XLATE          (APU_HAVE_APR_ICONV || APU_HAVE_ICONV)
 
+#define APU_DBD_DRIVER_FMT APU_DSO_LIBDIR "/apr_dbd_%s.so"
+
 #endif /* APU_H */
 /** @} */

Modified: apr/apr-util/trunk/include/apu.hnw
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/include/apu.hnw?view=diff&rev=553027&r1=553026&r2=553027
==============================================================================
--- apr/apr-util/trunk/include/apu.hnw (original)
+++ apr/apr-util/trunk/include/apu.hnw Tue Jul  3 17:36:35 2007
@@ -82,5 +82,7 @@
 #define APU_HAVE_ICONV         1
 #define APR_HAS_XLATE          (APU_HAVE_APR_ICONV || APU_HAVE_ICONV)
 
+#define APU_DBD_DRIVER_FMT "dbd%s.nlm"
+
 #endif /* APU_H */
 /** @} */

Modified: apr/apr-util/trunk/include/apu.hw
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/include/apu.hw?view=diff&rev=553027&r1=553026&r2=553027
==============================================================================
--- apr/apr-util/trunk/include/apu.hw (original)
+++ apr/apr-util/trunk/include/apu.hw Tue Jul  3 17:36:35 2007
@@ -109,5 +109,7 @@
 #define APU_HAVE_SQLITE3    0
 #endif
 
+#define APU_DBD_DRIVER_FMT "apr_dbd_%s.dll"
+
 #endif /* APU_H */
 #endif /* WIN32 */



Mime
View raw message