Share

Logging Framework for C

Tracker: Bugs

5 c++ specific keyword used in rollingpolicy.h header file - ID: 2536189
Last Update: Tracker Item Submitted ( porchowski )

While mixing c++ with c and using log4c tool, including
#include<log4c.h> header file gives errors while compiling user projects
with following errors:

make
g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB
-I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore
-I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I. -o main.o main.cpp
/usr/local/include/log4c/rollingpolicy.h:55: error: expected ‘,’ or
‘...’ before ‘this’
/usr/local/include/log4c/rollingpolicy.h:60: error: expected ‘,’ or
‘...’ before ‘this’
/usr/local/include/log4c/rollingpolicy.h:122: error: expected ‘,’ or
‘...’ before ‘this’
/usr/local/include/log4c/rollingpolicy.h:188: error: expected ‘,’ or
‘...’ before ‘this’
/usr/local/include/log4c/rollingpolicy.h:191: error: expected ‘,’ or
‘...’ before ‘this’
/usr/local/include/log4c/rollingpolicy.h:192: error: expected ‘,’ or
‘...’ before ‘this’
/usr/local/include/log4c/rollingpolicy.h:195: error: expected ‘,’ or
‘...’ before ‘this’
make: *** [main.o] Error 1
====
Note: gcc compiler does not produces those errors.
====

Fix description:
This is a C++ keyword, thus it seems that is a simple change in
rollingpolicy.h header
to avoid of using 'this' as below:

int (*init)(log4c_rollingpolicy_t *this, rollingfile_udata_t* rfudatap );

changing '*this' to something like '*_this' resolves all compilation
problems.

Rg's
PO


Piotr Orchowski ( porchowski ) - 2009-01-25 22:09

5

Open

None

Nobody/Anonymous

None

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.