You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by fu...@apache.org on 2007/07/11 01:56:44 UTC
svn commit: r555117 - in /apr/apr-util/trunk: dbd/apr_dbd.c include/apu.h.in
include/apu.hnw include/apu.hw
Author: fuankg
Date: Tue Jul 10 16:56:43 2007
New Revision: 555117
URL: http://svn.apache.org/viewvc?view=rev&rev=555117
Log:
reverted r553027;
changed apr_snprintf() for driver load as suggested by Martin.
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=555117&r1=555116&r2=555117
==============================================================================
--- apr/apr-util/trunk/dbd/apr_dbd.c (original)
+++ apr/apr-util/trunk/dbd/apr_dbd.c Tue Jul 10 16:56:43 2007
@@ -150,13 +150,19 @@
/* 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);
- /* APU_DBD_DRIVER_FMT is defined in apu.h */
- apr_snprintf(path, sizeof path, APU_DBD_DRIVER_FMT, name);
+
+#ifdef WIN32
+ apr_snprintf(path, sizeof path, "apr_dbd_%s.dll", name);
+#elif defined(NETWARE)
+ apr_snprintf(path, sizeof path, "dbd%s.nlm", name);
+#else
+ apr_snprintf(path, sizeof path, "%s/apr_dbd_%s.so", APU_DSO_LIBDIR, name);
+#endif
rv = apr_dso_load(&dlhandle, path, pool);
if (rv != APR_SUCCESS) { /* APR_EDSOOPEN */
goto unlock;
}
- apr_snprintf(path, sizeof path, "apr_dbd_%s_driver", name);
+ sprintf(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=555117&r1=555116&r2=555117
==============================================================================
--- apr/apr-util/trunk/include/apu.h.in (original)
+++ apr/apr-util/trunk/include/apu.h.in Tue Jul 10 16:56:43 2007
@@ -88,7 +88,5 @@
#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=555117&r1=555116&r2=555117
==============================================================================
--- apr/apr-util/trunk/include/apu.hnw (original)
+++ apr/apr-util/trunk/include/apu.hnw Tue Jul 10 16:56:43 2007
@@ -82,7 +82,5 @@
#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=555117&r1=555116&r2=555117
==============================================================================
--- apr/apr-util/trunk/include/apu.hw (original)
+++ apr/apr-util/trunk/include/apu.hw Tue Jul 10 16:56:43 2007
@@ -109,7 +109,5 @@
#define APU_HAVE_SQLITE3 0
#endif
-#define APU_DBD_DRIVER_FMT "apr_dbd_%s.dll"
-
#endif /* APU_H */
#endif /* WIN32 */