On Tue, Nov 30, 2010 at 8:58 AM, Ben Noordhuis <i...@bnoordhuis.nl> wrote:
> 2010/11/30 whut_jia <whut_...@163.com>:
>> In Apache2.2, I compile a c++ source file with g++ as below:
>> g++ -fPIC -shared -o mod_validate.so mod_validate.cpp -I/usr/include/httpd 
>> -I/usr/include/apr-1 -I/opt/opensaml/include
>> After it , I copy mod_calidate.so into apache module location ,and this 
>> module work well.
>> But now,in apache2.3,I compile this file in  the same way.it accurs the 
>> following error,
>>     /apache2.3/include/http_config.h:989:error:expected ","or "..." before 
>> ‘new’
>> (In headers file ,The 989th  line is:
>> AP_DECLARE(void) ap_merge_log_config(const struct ap_logconf *old,
>>                                     struct ap_logconf *new);
>> )
>> I think there are not errors in this line ,but why can i compile it 
>> successfullly?
>
> new is a C++ keyword. Three solutions.
>
> 1. Rename the parameter in http_config.h to new_conf. Bad.
> 2. At the top of your source file add "#define new new_". Bad.
> 3. Make your module C only. Split off the C++ code into a separate file. Good.
>


I believe this was reported and fixed in trunk over the last month or so.

-- 
Eric Covener
cove...@gmail.com

Reply via email to