httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cantor, Scott" <>
Subject Re: AP_INIT_TAKEn macros / gcc 4.6.3?
Date Tue, 24 Jul 2012 21:58:39 GMT
On 7/24/12 5:51 PM, "Nick Kew" <> wrote:
>Did you fix it?

No, I'm still investigating. So far all I can prove is that it's the
compiler turning on __STDC_VERSION__ itself, not any headers I'm using. I
put a #if up at the top of my source and it reports it's on immediately.

This is, umm, not right, of course. But I don't know what's responsible,
short of saying g++ is broken in this particular system.

>My recollection of the problem is from several years ago (I think it
>first hit me updating from 2.0 to 2.2), and I have no actual recollection
>of what fixed it.  My reply to you was based on a quick look at the
>code in question, which uses the extern "C" { ... } and works!

Even if you have extern "C", if the AP_ macros are defined in the top half
of the http_config file in the "standard C" part, it won't compile for
C++. The bottom half of the header has alternative definitions of those
macros that don't use that initialization syntax and those compile. I took
the extern "C" out of a working build, and it still worked. Of course
there are probably historical iterations of all that, and I had extern "C"
in place myself.

I can probably hack around this issue by overriding the preprocessor, but
I prefer to know why the compiler's doing this. Anyway, not an Apache
question after all, just happened to bite me here.

-- Scott

View raw message