apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fua...@apache.org
Subject svn commit: r553030 - in /apr/apr-util/branches/1.2.x: dbd/apr_dbd.c include/apu.h.in include/apu.hnw include/apu.hw
Date Wed, 04 Jul 2007 00:50:45 GMT
Author: fuankg
Date: Tue Jul  3 17:50:44 2007
New Revision: 553030

URL: http://svn.apache.org/viewvc?view=rev&rev=553030
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/branches/1.2.x/dbd/apr_dbd.c
    apr/apr-util/branches/1.2.x/include/apu.h.in
    apr/apr-util/branches/1.2.x/include/apu.hnw
    apr/apr-util/branches/1.2.x/include/apu.hw

Modified: apr/apr-util/branches/1.2.x/dbd/apr_dbd.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.2.x/dbd/apr_dbd.c?view=diff&rev=553030&r1=553029&r2=553030
==============================================================================
--- apr/apr-util/branches/1.2.x/dbd/apr_dbd.c (original)
+++ apr/apr-util/branches/1.2.x/dbd/apr_dbd.c Tue Jul  3 17:50:44 2007
@@ -124,18 +124,13 @@
     }
 #endif
 
-#ifdef WIN32
-    sprintf(path, "apr_dbd_%s.dll", name);
-#elif defined(NETWARE)
-    sprintf(path, "dbd%s.nlm", name);
-#else
-    sprintf(path, "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((void*)driver, dlhandle, path);
     if (rv != APR_SUCCESS) { /* APR_ESYMNOTFOUND */
         apr_dso_unload(dlhandle);

Modified: apr/apr-util/branches/1.2.x/include/apu.h.in
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.2.x/include/apu.h.in?view=diff&rev=553030&r1=553029&r2=553030
==============================================================================
--- apr/apr-util/branches/1.2.x/include/apu.h.in (original)
+++ apr/apr-util/branches/1.2.x/include/apu.h.in Tue Jul  3 17:50:44 2007
@@ -87,5 +87,7 @@
 #define APU_HAVE_ICONV         @have_iconv@
 #define APR_HAS_XLATE          (APU_HAVE_APR_ICONV || APU_HAVE_ICONV)
 
+#define APU_DBD_DRIVER_FMT "apr_dbd_%s.so"
+
 #endif /* APU_H */
 /** @} */

Modified: apr/apr-util/branches/1.2.x/include/apu.hnw
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.2.x/include/apu.hnw?view=diff&rev=553030&r1=553029&r2=553030
==============================================================================
--- apr/apr-util/branches/1.2.x/include/apu.hnw (original)
+++ apr/apr-util/branches/1.2.x/include/apu.hnw Tue Jul  3 17:50:44 2007
@@ -85,5 +85,7 @@
  */
 #define APR_DSO_BUILD APR_HAS_DSO
 
+#define APU_DBD_DRIVER_FMT "dbd%s.nlm"
+
 #endif /* APU_H */
 /** @} */

Modified: apr/apr-util/branches/1.2.x/include/apu.hw
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.2.x/include/apu.hw?view=diff&rev=553030&r1=553029&r2=553030
==============================================================================
--- apr/apr-util/branches/1.2.x/include/apu.hw (original)
+++ apr/apr-util/branches/1.2.x/include/apu.hw Tue Jul  3 17:50:44 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