Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 77463 invoked from network); 4 Jul 2007 00:37:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Jul 2007 00:37:00 -0000 Received: (qmail 55365 invoked by uid 500); 4 Jul 2007 00:37:03 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 55326 invoked by uid 500); 4 Jul 2007 00:37:03 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 55315 invoked by uid 99); 4 Jul 2007 00:37:03 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jul 2007 17:37:03 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jul 2007 17:36:57 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 556641A981A; Tue, 3 Jul 2007 17:36:37 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@apr.apache.org From: fuankg@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070704003637.556641A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 */