httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
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 GMT
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 <unistd.h>
@@ -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;



Mime
View raw message