Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 43567 invoked from network); 26 Mar 2009 13:27:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Mar 2009 13:27:07 -0000 Received: (qmail 99819 invoked by uid 500); 26 Mar 2009 13:27:07 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 99737 invoked by uid 500); 26 Mar 2009 13:27:06 -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 99728 invoked by uid 99); 26 Mar 2009 13:27:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Mar 2009 13:27:06 +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; Thu, 26 Mar 2009 13:27:05 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 368302388962; Thu, 26 Mar 2009 13:26:45 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r758627 - in /httpd/httpd/trunk/modules/filters: mod_ratelimit.c mod_ratelimit.h Date: Thu, 26 Mar 2009 13:26:42 -0000 To: cvs@httpd.apache.org From: wrowe@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090326132645.368302388962@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: wrowe Date: Thu Mar 26 13:26:38 2009 New Revision: 758627 URL: http://svn.apache.org/viewvc?rev=758627&view=rev Log: Namespaces namespaces namespaces guys... EFAIL :) Modified: httpd/httpd/trunk/modules/filters/mod_ratelimit.c httpd/httpd/trunk/modules/filters/mod_ratelimit.h Modified: httpd/httpd/trunk/modules/filters/mod_ratelimit.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_ratelimit.c?rev=758627&r1=758626&r2=758627&view=diff ============================================================================== --- httpd/httpd/trunk/modules/filters/mod_ratelimit.c (original) +++ httpd/httpd/trunk/modules/filters/mod_ratelimit.c Thu Mar 26 13:26:38 2009 @@ -123,7 +123,7 @@ /* Find where we 'stop' going full speed. */ for (e = APR_BRIGADE_FIRST(bb); e != APR_BRIGADE_SENTINEL(bb); e = APR_BUCKET_NEXT(e)) { - if (RL_BUCKET_IS_END(e)) { + if (AP_RL_BUCKET_IS_END(e)) { apr_bucket *f; f = APR_RING_LAST(&bb->list); APR_RING_UNSPLICE(e, f, link); @@ -154,7 +154,7 @@ while (ctx->state == RATE_LIMIT && !APR_BRIGADE_EMPTY(bb)) { for (e = APR_BRIGADE_FIRST(bb); e != APR_BRIGADE_SENTINEL(bb); e = APR_BUCKET_NEXT(e)) { - if (RL_BUCKET_IS_START(e)) { + if (AP_RL_BUCKET_IS_START(e)) { apr_bucket *f; f = APR_RING_LAST(&bb->list); APR_RING_UNSPLICE(e, f, link); @@ -239,8 +239,8 @@ return APR_SUCCESS; } -AP_DECLARE(apr_bucket *) - rl_end_create(apr_bucket_alloc_t *list) +AP_RL_DECLARE(apr_bucket *) + ap_rl_end_create(apr_bucket_alloc_t *list) { apr_bucket *b = apr_bucket_alloc(sizeof(*b), list); @@ -250,13 +250,13 @@ b->length = 0; b->start = 0; b->data = NULL; - b->type = &rl_bucket_type_end; + b->type = &ap_rl_bucket_type_end; return b; } -AP_DECLARE(apr_bucket *) - rl_start_create(apr_bucket_alloc_t *list) +AP_RL_DECLARE(apr_bucket *) + ap_rl_start_create(apr_bucket_alloc_t *list) { apr_bucket *b = apr_bucket_alloc(sizeof(*b), list); @@ -266,14 +266,14 @@ b->length = 0; b->start = 0; b->data = NULL; - b->type = &rl_bucket_type_start; + b->type = &ap_rl_bucket_type_start; return b; } -AP_DECLARE_DATA const apr_bucket_type_t rl_bucket_type_end = { +AP_RL_DECLARE_DATA const apr_bucket_type_t ap_rl_bucket_type_end = { "RL_END", 5, APR_BUCKET_METADATA, apr_bucket_destroy_noop, rl_bucket_read, @@ -283,7 +283,7 @@ }; -AP_DECLARE_DATA const apr_bucket_type_t rl_bucket_type_start = { +AP_RL_DECLARE_DATA const apr_bucket_type_t ap_rl_bucket_type_start = { "RL_START", 5, APR_BUCKET_METADATA, apr_bucket_destroy_noop, rl_bucket_read, Modified: httpd/httpd/trunk/modules/filters/mod_ratelimit.h URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_ratelimit.h?rev=758627&r1=758626&r2=758627&view=diff ============================================================================== --- httpd/httpd/trunk/modules/filters/mod_ratelimit.h (original) +++ httpd/httpd/trunk/modules/filters/mod_ratelimit.h Thu Mar 26 13:26:38 2009 @@ -17,14 +17,35 @@ #ifndef _MOD_RATELIMIT_H_ #define _MOD_RATELIMIT_H_ -AP_DECLARE_DATA extern const apr_bucket_type_t rl_bucket_type_end; -AP_DECLARE_DATA extern const apr_bucket_type_t rl_bucket_type_start; +/* Create a set of AP_RL_DECLARE(type), AP_RL_DECLARE_NONSTD(type) and + * AP_RL_DECLARE_DATA with appropriate export and import tags for the platform + */ +#if !defined(WIN32) +#define AP_RL_DECLARE(type) type +#define AP_RL_DECLARE_NONSTD(type) type +#define AP_RL_DECLARE_DATA +#elif defined(AP_RL_DECLARE_STATIC) +#define AP_RL_DECLARE(type) type __stdcall +#define AP_RL_DECLARE_NONSTD(type) type +#define AP_RL_DECLARE_DATA +#elif defined(AP_RL_DECLARE_EXPORT) +#define AP_RL_DECLARE(type) __declspec(dllexport) type __stdcall +#define AP_RL_DECLARE_NONSTD(type) __declspec(dllexport) type +#define AP_RL_DECLARE_DATA __declspec(dllexport) +#else +#define AP_RL_DECLARE(type) __declspec(dllimport) type __stdcall +#define AP_RL_DECLARE_NONSTD(type) __declspec(dllimport) type +#define AP_RL_DECLARE_DATA __declspec(dllimport) +#endif + +AP_RL_DECLARE_DATA extern const apr_bucket_type_t ap_rl_bucket_type_end; +AP_RL_DECLARE_DATA extern const apr_bucket_type_t ap_rl_bucket_type_start; -#define RL_BUCKET_IS_END(e) (e->type == &rl_bucket_type_end) -#define RL_BUCKET_IS_START(e) (e->type == &rl_bucket_type_start) +#define AP_RL_BUCKET_IS_END(e) (e->type == &ap_rl_bucket_type_end) +#define AP_RL_BUCKET_IS_START(e) (e->type == &ap_rl_bucket_type_start) /* TODO: Make these Optional Functions, so that module load order doesn't matter. */ -apr_bucket* rl_end_create(apr_bucket_alloc_t *list); -apr_bucket* rl_start_create(apr_bucket_alloc_t *list); +AP_RL_DECLARE(apr_bucket*) ap_rl_end_create(apr_bucket_alloc_t *list); +AP_RL_DECLARE(apr_bucket*) ap_rl_start_create(apr_bucket_alloc_t *list); #endif