You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Mladen Turk <mt...@apache.org> on 2004/08/01 11:26:12 UTC
[PATCH] mod_proxy -- enable using 2.1-HEAD on 2.0-HEAD
Oops... gone trough different email, so reposting.
Hi,
Not a very 'critical' patch, but enables building mod_proxy on 2.0-HEAD (if
someone finds that usefull).
Since 2.1 has some nice features (will have more hopefully) here is the
patch that enables that.
Index: proxy_util.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/proxy/proxy_util.c,v
retrieving revision 1.108
diff -u -r1.108 proxy_util.c
--- proxy_util.c 29 Jun 2004 06:37:21 -0000 1.108
+++ proxy_util.c 1 Aug 2004 09:12:54 -0000
@@ -995,7 +995,12 @@
int loglevel;
while (backend_addr && !connected) {
- if ((rv = apr_socket_create(newsock, backend_addr->family,
+#if (APR_VERSION_MAJOR > 0)
+ if ((rv = apr_socket_create(
+#else
+ if ((rv = apr_socket_create_ex(
+#endif
+ newsock, backend_addr->family,
SOCK_STREAM, 0, p)) != APR_SUCCESS) {
loglevel = backend_addr->next ? APLOG_DEBUG : APLOG_ERR;
ap_log_error(APLOG_MARK, loglevel, rv, s,
Index: mod_proxy.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/proxy/mod_proxy.c,v
retrieving revision 1.103
diff -u -r1.103 mod_proxy.c
--- mod_proxy.c 4 Jul 2004 22:39:06 -0000 1.103
+++ mod_proxy.c 1 Aug 2004 09:15:35 -0000
@@ -20,7 +20,13 @@
#include "mod_core.h"
#include "apr_optional.h"
+
+#if (MODULE_MAGIC_NUMBER_MAJOR > 20020903)
#include "mod_ssl.h"
+#else
+APR_DECLARE_OPTIONAL_FN(int, ssl_proxy_enable, (conn_rec *));
+APR_DECLARE_OPTIONAL_FN(int, ssl_engine_disable, (conn_rec *));
+#endif
#ifndef MAX
#define MAX(x,y) ((x) >= (y) ? (x) : (y))
Regards,
MT.
Re: [PATCH] mod_proxy -- enable using 2.1-HEAD on 2.0-HEAD
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 05:10 AM 8/1/2004, you wrote:
>--On Sunday, August 1, 2004 11:26 AM +0200 Mladen Turk <mt...@apache.org> wrote:
>
>>- if ((rv = apr_socket_create(newsock, backend_addr->family,
>>+#if (APR_VERSION_MAJOR > 0)
>>+ if ((rv = apr_socket_create(
>>+#else
>>+ if ((rv = apr_socket_create_ex(
>>+#endif
>>+ newsock, backend_addr->family,
>
>Shouldn't that be APR_MAJOR_VERSION? I'm also not sure how many C pre-processors handle conditionals like that. Does HP's and IBM's? -- justin
Conditional #if evaluation was defined back in K&R and c89.
RE: [PATCH] mod_proxy -- enable using 2.1-HEAD on 2.0-HEAD
Posted by Mladen Turk <mt...@apache.org>.
Justin Erenkrantz wrote:
> > - if ((rv = apr_socket_create(newsock, backend_addr->family,
> > +#if (APR_VERSION_MAJOR > 0)
> > + if ((rv = apr_socket_create(
> > +#else
> > + if ((rv = apr_socket_create_ex( #endif
> > + newsock, backend_addr->family,
>
> Shouldn't that be APR_MAJOR_VERSION?
Yes, typo on copy paste to cvs tree :).
> I'm also not sure how
> many C pre-processors handle conditionals like that. Does
> HP's and IBM's? -- justin
>
Well, the mod_ssl uses a lot of those '#if (xxx > yyy)' so I think that's
supported.
MT.
Re: [PATCH] mod_proxy -- enable using 2.1-HEAD on 2.0-HEAD
Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Sunday, August 1, 2004 11:26 AM +0200 Mladen Turk <mt...@apache.org>
wrote:
> - if ((rv = apr_socket_create(newsock, backend_addr->family,
> +#if (APR_VERSION_MAJOR > 0)
> + if ((rv = apr_socket_create(
> +#else
> + if ((rv = apr_socket_create_ex(
> +#endif
> + newsock, backend_addr->family,
Shouldn't that be APR_MAJOR_VERSION? I'm also not sure how many C
pre-processors handle conditionals like that. Does HP's and IBM's? -- justin