You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2002/03/09 15:04:11 UTC

cvs commit: httpd-2.0/modules/proxy mod_proxy.c

trawick     02/03/09 06:04:11

  Modified:    modules/proxy mod_proxy.c
  Log:
  provide missing MAX() macro so that proxy can compile again
  
  Revision  Changes    Path
  1.74      +3 -0      httpd-2.0/modules/proxy/mod_proxy.c
  
  Index: mod_proxy.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/mod_proxy.c,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- mod_proxy.c	9 Mar 2002 07:15:33 -0000	1.73
  +++ mod_proxy.c	9 Mar 2002 14:04:11 -0000	1.74
  @@ -63,6 +63,9 @@
   
   extern module AP_MODULE_DECLARE_DATA proxy_module;
   
  +#ifndef MAX
  +#define MAX(x,y) ((x) >= (y) ? (x) : (y))
  +#endif
   
   /*
    * A Web proxy module. Stages:
  
  
  

Re: cvs commit: httpd-2.0/modules/proxy mod_proxy.c

Posted by Graham Leggett <mi...@sharp.fm>.
trawick@apache.org wrote:

>   provide missing MAX() macro so that proxy can compile again

Thanks - found it while I was on the plane earlier this morning, but
could not get anywhere near a net connection till now.

Regards,
Graham
-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."

Re: cvs commit: httpd-2.0/modules/proxy mod_proxy.c

Posted by Jeff Trawick <tr...@attglobal.net>.
"Sander Striker" <st...@apache.org> writes:

> > From: trawick@apache.org [mailto:trawick@apache.org]
> > Sent: 09 March 2002 15:04
> 
> > trawick     02/03/09 06:04:11
> > 
> >   Modified:    modules/proxy mod_proxy.c
> >   Log:
> >   provide missing MAX() macro so that proxy can compile again

> This seems like a common enough thing to deserve a place in APR.
> We can do it like we handle some of the string functions*, or
> we can define an APR_MAX, APR_MIN, etc.
> 
> Thoughts?

I'd prefer that you unconditionally define APR_MAX() and APR_MIN()
rather than trying to define MAX() (or MIN) where it isn't defined.
Since MAX() isn't standard by any means, if we defined it we would
become the bad guys w.r.t. namespace protection if we defined it.

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: cvs commit: httpd-2.0/modules/proxy mod_proxy.c

Posted by Jeff Trawick <tr...@attglobal.net>.
"Sander Striker" <st...@apache.org> writes:

> > From: trawick@apache.org [mailto:trawick@apache.org]
> > Sent: 09 March 2002 15:04
> 
> > trawick     02/03/09 06:04:11
> > 
> >   Modified:    modules/proxy mod_proxy.c
> >   Log:
> >   provide missing MAX() macro so that proxy can compile again

> This seems like a common enough thing to deserve a place in APR.
> We can do it like we handle some of the string functions*, or
> we can define an APR_MAX, APR_MIN, etc.
> 
> Thoughts?

I'd prefer that you unconditionally define APR_MAX() and APR_MIN()
rather than trying to define MAX() (or MIN) where it isn't defined.
Since MAX() isn't standard by any means, if we defined it we would
become the bad guys w.r.t. namespace protection if we defined it.

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

RE: cvs commit: httpd-2.0/modules/proxy mod_proxy.c

Posted by Sander Striker <st...@apache.org>.
> From: trawick@apache.org [mailto:trawick@apache.org]
> Sent: 09 March 2002 15:04

> trawick     02/03/09 06:04:11
> 
>   Modified:    modules/proxy mod_proxy.c
>   Log:
>   provide missing MAX() macro so that proxy can compile again
>   
>   Revision  Changes    Path
>   1.74      +3 -0      httpd-2.0/modules/proxy/mod_proxy.c
>   
>   Index: mod_proxy.c
>   ===================================================================
>   RCS file: /home/cvs/httpd-2.0/modules/proxy/mod_proxy.c,v
>   retrieving revision 1.73
>   retrieving revision 1.74
>   diff -u -r1.73 -r1.74
>   --- mod_proxy.c	9 Mar 2002 07:15:33 -0000	1.73
>   +++ mod_proxy.c	9 Mar 2002 14:04:11 -0000	1.74
>   @@ -63,6 +63,9 @@
>    
>    extern module AP_MODULE_DECLARE_DATA proxy_module;
>    
>   +#ifndef MAX
>   +#define MAX(x,y) ((x) >= (y) ? (x) : (y))
>   +#endif
>    
>    /*
>     * A Web proxy module. Stages:

This seems like a common enough thing to deserve a place in APR.
We can do it like we handle some of the string functions*, or
we can define an APR_MAX, APR_MIN, etc.

Thoughts?

Sander

*) define them if they are not present


RE: cvs commit: httpd-2.0/modules/proxy mod_proxy.c

Posted by Sander Striker <st...@apache.org>.
> From: trawick@apache.org [mailto:trawick@apache.org]
> Sent: 09 March 2002 15:04

> trawick     02/03/09 06:04:11
> 
>   Modified:    modules/proxy mod_proxy.c
>   Log:
>   provide missing MAX() macro so that proxy can compile again
>   
>   Revision  Changes    Path
>   1.74      +3 -0      httpd-2.0/modules/proxy/mod_proxy.c
>   
>   Index: mod_proxy.c
>   ===================================================================
>   RCS file: /home/cvs/httpd-2.0/modules/proxy/mod_proxy.c,v
>   retrieving revision 1.73
>   retrieving revision 1.74
>   diff -u -r1.73 -r1.74
>   --- mod_proxy.c	9 Mar 2002 07:15:33 -0000	1.73
>   +++ mod_proxy.c	9 Mar 2002 14:04:11 -0000	1.74
>   @@ -63,6 +63,9 @@
>    
>    extern module AP_MODULE_DECLARE_DATA proxy_module;
>    
>   +#ifndef MAX
>   +#define MAX(x,y) ((x) >= (y) ? (x) : (y))
>   +#endif
>    
>    /*
>     * A Web proxy module. Stages:

This seems like a common enough thing to deserve a place in APR.
We can do it like we handle some of the string functions*, or
we can define an APR_MAX, APR_MIN, etc.

Thoughts?

Sander

*) define them if they are not present