Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 6389 invoked from network); 1 Apr 2009 22:07:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Apr 2009 22:07:12 -0000 Received: (qmail 85643 invoked by uid 500); 1 Apr 2009 22:07:12 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 85568 invoked by uid 500); 1 Apr 2009 22:07:12 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 85559 invoked by uid 99); 1 Apr 2009 22:07:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Apr 2009 22:07:12 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Apr 2009 22:07:11 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A48D0238896D; Wed, 1 Apr 2009 22:06:50 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r761084 - in /httpd/httpd/trunk: modules/cluster/mod_heartmonitor.c modules/proxy/mod_serf.c modules/test/mod_dialup.c server/mpm/event/event.c server/mpm/simple/simple_run.c Date: Wed, 01 Apr 2009 22:06:50 -0000 To: cvs@httpd.apache.org From: trawick@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090401220650.A48D0238896D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: trawick Date: Wed Apr 1 22:06:49 2009 New Revision: 761084 URL: http://svn.apache.org/viewvc?rev=761084&view=rev Log: clean up apr_time_from_msec() compatibility macros * where needed, base on APR_VERSION_AT_LEAST() so we remember what this is about * where not, axe Modified: httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c httpd/httpd/trunk/modules/proxy/mod_serf.c httpd/httpd/trunk/modules/test/mod_dialup.c httpd/httpd/trunk/server/mpm/event/event.c httpd/httpd/trunk/server/mpm/simple/simple_run.c Modified: httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c?rev=761084&r1=761083&r2=761084&view=diff ============================================================================== --- httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c (original) +++ httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c Wed Apr 1 22:06:49 2009 @@ -297,12 +297,6 @@ return rv; } - -#ifndef apr_time_from_msec -#define apr_time_from_msec(x) (x * 1000) -#endif - - static apr_status_t hm_watchdog_callback(int state, void *data, apr_pool_t *pool) { Modified: httpd/httpd/trunk/modules/proxy/mod_serf.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_serf.c?rev=761084&r1=761083&r2=761084&view=diff ============================================================================== --- httpd/httpd/trunk/modules/proxy/mod_serf.c (original) +++ httpd/httpd/trunk/modules/proxy/mod_serf.c Wed Apr 1 22:06:49 2009 @@ -26,6 +26,7 @@ #include "serf.h" #include "apr_uri.h" #include "apr_strings.h" +#include "apr_version.h" #include "ap_mpm.h" module AP_MODULE_DECLARE_DATA serf_module; @@ -62,6 +63,9 @@ serf_bucket_t *body_bkt; } s_baton_t; +#if !APR_VERSION_AT_LEAST(1,4,0) +#define apr_time_from_msec(x) (x * 1000) +#endif /** * This works right now because all timers are invoked in the single listener @@ -393,10 +397,6 @@ return APR_SUCCESS; } -#ifndef apr_time_from_msec -#define apr_time_from_msec(x) (x * 1000) -#endif - /* TOOD: rewrite drive_serf to make it async */ static int drive_serf(request_rec *r, serf_config_t *conf) { Modified: httpd/httpd/trunk/modules/test/mod_dialup.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/test/mod_dialup.c?rev=761084&r1=761083&r2=761084&view=diff ============================================================================== --- httpd/httpd/trunk/modules/test/mod_dialup.c (original) +++ httpd/httpd/trunk/modules/test/mod_dialup.c Wed Apr 1 22:06:49 2009 @@ -31,11 +31,6 @@ module AP_MODULE_DECLARE_DATA dialup_module; -#ifndef apr_time_from_msec -#define apr_time_from_msec(x) (x * 1000) -#endif - - typedef struct dialup_dcfg_t { apr_size_t bytes_per_second; } dialup_dcfg_t; Modified: httpd/httpd/trunk/server/mpm/event/event.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/event/event.c?rev=761084&r1=761083&r2=761084&view=diff ============================================================================== --- httpd/httpd/trunk/server/mpm/event/event.c (original) +++ httpd/httpd/trunk/server/mpm/event/event.c Wed Apr 1 22:06:49 2009 @@ -57,6 +57,7 @@ #include "apr_queue.h" #define APR_WANT_STRFUNC #include "apr_want.h" +#include "apr_version.h" #if APR_HAVE_UNISTD_H #include @@ -143,6 +144,10 @@ #define MPM_CHILD_PID(i) (ap_scoreboard_image->parent[i].pid) +#if !APR_VERSION_AT_LEAST(1,4,0) +#define apr_time_from_msec(x) (x * 1000) +#endif + /* * Actual definitions of config globals */ @@ -1031,10 +1036,6 @@ return APR_SUCCESS; } -#ifndef apr_time_from_msec -#define apr_time_from_msec(x) (x * 1000) -#endif - static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy) { timer_event_t *ep; Modified: httpd/httpd/trunk/server/mpm/simple/simple_run.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/simple/simple_run.c?rev=761084&r1=761083&r2=761084&view=diff ============================================================================== --- httpd/httpd/trunk/server/mpm/simple/simple_run.c (original) +++ httpd/httpd/trunk/server/mpm/simple/simple_run.c Wed Apr 1 22:06:49 2009 @@ -29,6 +29,11 @@ #include "ap_listen.h" #include "mpm_common.h" +#include "apr_version.h" + +#if !APR_VERSION_AT_LEAST(1,4,0) +#define apr_time_from_msec(msec) ((apr_time_t)(msec) * 1000) +#endif /** * Create Timers. @@ -135,10 +140,6 @@ return NULL; } -#ifndef apr_time_from_msec -#define apr_time_from_msec(msec) ((apr_time_t)(msec) * 1000) -#endif - static int simple_run_loop(simple_core_t * sc) { apr_status_t rv;