From ecb9c1cf5a184e956c4ebd0b1707f422741eeaaa Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Tue, 28 May 2013 19:02:58 -0400 Subject: [PATCH] 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 --- xcbutils.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xcbutils.h b/xcbutils.h index 09f8e8dc8d..92a17f3359 100644 --- a/xcbutils.h +++ b/xcbutils.h @@ -29,7 +29,11 @@ along with this program. If not, see . #include #include +#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 +#undef class //UNDO HACK namespace KWin {