httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregg L. Smith" <li...@glewis.com>
Subject Re: svn commit: r1055250 - in /httpd/httpd/trunk: CHANGES modules/proxy/mod_proxy_http.c modules/proxy/proxy_util.c
Date Thu, 06 Jan 2011 01:55:51 GMT
Hello,

minfrin@apache.org wrote:
> Author: minfrin
> Date: Wed Jan  5 00:23:43 2011
> New Revision: 1055250

> Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=1055250&r1=1055249&r2=1055250&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
> +++ httpd/httpd/trunk/modules/proxy/proxy_util.c Wed Jan  5 00:23:43 2011
> @@ -348,16 +348,20 @@ PROXY_DECLARE(const char *)
>  
>  PROXY_DECLARE(request_rec *)ap_proxy_make_fake_req(conn_rec *c, request_rec *r)
>  {
> -    request_rec *rp = apr_pcalloc(r->pool, sizeof(*r));
> +    apr_pool_t *pool;
> +
> +    apr_pool_create(&pool, c->pool);
> +
> +    request_rec *rp = apr_pcalloc(pool, sizeof(*r));
>  

MSVC idiosyncrasy, you cannot declare rp after doing something, in this 
case "something" is calling apr_pool_create.

.\proxy_util.c(355) : error C2275: 'request_rec' : illegal use of this
type as an expression
         c:\build\nresvn\include\httpd.h(730) : see declaration of
'request_rec'
.\proxy_util.c(355) : error C2065: 'rp' : undeclared identifier

to the tune of 36 total errors.

It looks like this apr_pool_create and apr_pcalloc lines were 
specifically placed in this order so declare rp after pool.

apr_pool_t *pool;
request_rec *rp;

apr_pool_create(&pool, c->pool);

rp = apr_pcalloc(pool, sizeof(*r));

Thanks,

Gregg




Mime
View raw message