You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by pt...@pobox.com on 2003/01/29 02:58:04 UTC

[PATCH] flood: Fixed PASSTHROUGH collision in flood_round_robin.c

Summary:
  * Fixed PASSTHROUGH collision in flood_round_robin.c.

This patch fixes compile errors in flood_round_robin.c
resulting from the Windows header file wingdi.h.  That
header file defines PASSTHROUGH, which is the same
identifier used as an enumerated constant for type
expand_param_e.  The enumerated constants now use a
prefix, "EPE_", to help make their names more unique.

Below are the compile errors this patch addresses:

flood_round_robin.c(102) : error C2059: syntax error : 'constant'
flood_round_robin.c(151) : error C2146: syntax error : missing ')' before identifier 'set'
flood_round_robin.c(151) : error C2081: 'expand_param_e' : name in formal parameter list illegal
flood_round_robin.c(151) : error C2061: syntax error : identifier 'set'
flood_round_robin.c(151) : error C2059: syntax error : ';'
flood_round_robin.c(151) : error C2059: syntax error : ')'
flood_round_robin.c(152) : error C2449: found '{' at file scope (missing function header?)
flood_round_robin.c(235) : error C2059: syntax error : '}'

Index: flood_round_robin.c
===================================================================
RCS file: /home/cvspublic/httpd-test/flood/flood_round_robin.c,v
retrieving revision 1.32
diff -u -r1.32 flood_round_robin.c
--- flood_round_robin.c	16 Sep 2002 09:55:07 -0000	1.32
+++ flood_round_robin.c	28 Jan 2003 23:43:32 -0000
@@ -97,9 +97,9 @@
 extern apr_file_t *local_stderr;
 
 typedef enum {
-    EXPAND,
-    EXPAND_SET,
-    PASSTHROUGH
+    EPE_EXPAND,
+    EPE_EXPAND_SET,
+    EPE_PASSTHROUGH
 } expand_param_e;
 
 typedef struct {
@@ -236,12 +236,12 @@
 
 static char *expand_param_string(round_robin_profile_t *rp, char *template)
 {
-    return handle_param_string(rp, template, EXPAND);
+    return handle_param_string(rp, template, EPE_EXPAND);
 }
 
 static char *parse_param_string(round_robin_profile_t *rp, char *template)
 {
-    return handle_param_string(rp, template, EXPAND_SET);
+    return handle_param_string(rp, template, EPE_EXPAND_SET);
 }
 
 /* Construct a request */
@@ -598,19 +598,19 @@
                     p->url[p->current_url].payloadtemplate = 
                         handle_param_string(p,
                                         p->url[p->current_url].payloadtemplate,
-                                        PASSTHROUGH);
+                                        EPE_PASSTHROUGH);
                 }
                 if (p->url[p->current_url].requesttemplate) {
                     p->url[p->current_url].requesttemplate = 
                         handle_param_string(p,
                                         p->url[p->current_url].requesttemplate,
-                                        PASSTHROUGH);
+                                        EPE_PASSTHROUGH);
                 }
                 if (p->url[p->current_url].responsetemplate) {
                     p->url[p->current_url].responsetemplate = 
                         handle_param_string(p,
                                         p->url[p->current_url].responsetemplate,
-                                        PASSTHROUGH);
+                                        EPE_PASSTHROUGH);
                 }
                 p->current_url++;
             }

Re: [PATCH] flood: Fixed PASSTHROUGH collision in flood_round_robin.c

Posted by Justin Erenkrantz <je...@apache.org>.
--On Tuesday, January 28, 2003 5:58 PM -0800 ptran@pobox.com wrote:

> Summary:
>   * Fixed PASSTHROUGH collision in flood_round_robin.c.

I don't really have a better idea than EPE, so it works for now.  =)

Applied.  Thanks!  -- justin