Add a hack for compiling xcb/xcb_icccm.h with C++.

xcb/xcb_iccm.h isn't C++ safe (some versions) because it has
a variable called "class" in function signatures. The hack
is to define "class" to something else before that header is
included, and then undef "class" immediately afterwards.

CCMAIL: mgraesslin@kde.org, fredrik@kde.org
icc-effect-5.14.5
Allen Winter 2013-05-28 19:02:58 -04:00
parent 47acf4ee9a
commit ecb9c1cf5a
1 changed files with 4 additions and 0 deletions

View File

@ -29,7 +29,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <xcb/xcb.h>
#include <xcb/composite.h>
#define class class_name //HACK: work around a non-C++ safe problem in xcb_iccm.h
//where they put a variable called "class" in function signatures.
//Needed at least for xcb v0.3.8
#include <xcb/xcb_icccm.h>
#undef class //UNDO HACK
namespace KWin {