httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <>
Subject Re: aplog_module_index and C++
Date Sat, 26 Mar 2011 13:47:14 GMT
On Sat, Mar 26, 2011 at 8:32 AM, Jeff Trawick <> wrote:
> On Fri, Mar 25, 2011 at 11:04 PM, William A. Rowe Jr.
> <> wrote:
>> On 3/25/2011 7:13 PM, Stefan Fritsch wrote:
>>> A possibility would be to put the tentative definition in http_log.h
>>> inside a #ifndef __cplusplus. In C, nothing would change. And in C++,
>>> one would have to set APLOG_USE_MODULE() before using any logging
>>> function. What do you think of that? Would that be too confusing?
>> +1, as long as the .h files are usable verbatim from .cpp sources, then
>> whatever specific magic is required for the .cpp modules to adopt the
>> logging constructs would make good sense, and be just a bit of extra
>> work for such developers.  It just needs documenting.
> Yeah, that's what I was planning.
>> I'll test-build mod_aspdotnet (a c++ module) against trunk just as soon
>> as your proposed fix is committed.
> Meanwhile I have another C++ module to practice with, hopefully using
> both g++ and Intel.  Maybe I can get that done today.

What I just committed works for me with g++ and icc.

icc points at APLOG_MARK and says "warning #279: controlling
expression is constant"

Since the default for aplog_module/index/APLOG_MODULE_INDEX is not
implemented for C++, we can change APLOG_MODULE_INDEX to the simpler

#define APLOG_MODULE_INDEX (*aplog_module_index)

for C++, which resolves that warning.

View raw message