httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <cove...@gmail.com>
Subject Re: httpd trunk broken with Subversion: ap_log_rerror busted
Date Wed, 25 Aug 2010 18:17:52 GMT
On Wed, Aug 25, 2010 at 11:31 AM, Justin Erenkrantz
<justin@erenkrantz.com> wrote:
> On Wed, Aug 25, 2010 at 4:48 AM, Stefan Fritsch <sf@sfritsch.de> wrote:
>> I agree that the comments/documentation should be improved. I will write a
>> how-to for adjusting modules to the new API.
>
> Here is a constructive suggestion (*grin*): in APR, for some of the
> more complex declarations (see apr_pools.h and apr_pool_create), what
> we have done is to create a #ifdef DOXYGEN tag which indicates the
> normalized reduced form of the function declaration.  The #else clause
> contains the optimized, macro-ized version.  (In httpd, I don't know
> what the appropriate #ifdef should be though.)
>
> This way those reading http_log.h will be able to see what the
> declaration for ap_log_rerror actually reduces to without trying to go
> through several layers of indirection.  -- justin
>

Related trivia, about how the stuff we have degrades for pre-c99:

I think this also breaks compilation of mod_eat_post (from test suite)
on AIX with xlc (not invoked as c99)

    if ((rc = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR)) != OK) {
        ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO,

#ifdef APACHE2
                     0,
#endif /* APACHE2 */
                     r->server,
                     "[mod_eat_post] ap_setup_client_block failed: %d", rc);
        return rc;
    }

After CPP the #endif is still there:

    if ((rc = ap_setup_client_block(r, 1)) != 0) {
#line 39
do { server_rec *sr =  #endif r->server; if (( ((( LOG_ERR|(15 +
1))&15) <= LOG_NOTICE) || (sr == 0) || ((((((aplog_module_index ?
*aplog_module_index : -1)) < 0 || (&(sr)->log)->module_levels == 0 ||
(&(sr)->log)->module_levels[(aplog_module_index ? *aplog_module_index
: -1)] < 0) ? (&(sr)->log)->level :
(&(sr)->log)->module_levels[(aplog_module_index ? *aplog_module_index
: -1)])) >= (( LOG_ERR|(15 + 1))&15) ) ))
ap_log_error_("mod_eat_post.c", 39, (aplog_module_index ?
*aplog_module_index : -1),  LOG_ERR|(15 + 1),  #ifdef 1 0, sr,
"[mod_eat_post] ap_setup_client_block failed: %d", rc); } while(0);
        return rc;
    }

But maybe this is xlc's fault?

-- 
Eric Covener
covener@gmail.com

Mime
View raw message