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
This commit is contained in:
parent
47acf4ee9a
commit
ecb9c1cf5a
1 changed files with 4 additions and 0 deletions
|
@ -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 {
|
||||
|
||||
|
|
Loading…
Reference in a new issue