httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <>
Subject AP_INIT_* macros in httpd-2.1
Date Sat, 08 Oct 2005 19:52:23 GMT
I've just stumbled on something perplexing.  Compiling mod_validator[1],
a large C++ module, for 2.1, I found each entry in the command_rec
generating a syntax error.  They are fine with 2.0.x.

The directives are declared with the conventional form:

        (const char*(*)())ValidatorXSLTBase,
        NULL, OR_ALL, "Base for XSLT files" ) ,

with the explicit cast of the function to shut C++ up.

Using the c++ with the -E option, I see that correctly expanded in 2.0 to
    { "ValidatorXSLTBase", (const char*(*)())ValidatorXSLTBase,
        __null, (1|2|4|8|16), TAKE1, "Base for XSLT files" } ,

but in 2.1, it expands to
    { "ValidatorXSLTBase", { .take1=(const char*(*)())ValidatorXSLTBase },
        __null, (1|2|4|8|16), TAKE1, "Base for XSLT files" } ,

Anyone know what's causing this?

The compiler is gcc-3.3.6.


Nick Kew

View raw message