From 8c5a2d6a88392e6bf6b280d8bc04ee6ed695bdcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 16 Aug 2020 19:03:46 +0200 Subject: [PATCH] Platform: Xlib strikes again, this time with #define Bool int. THe new MaterialData APIs introduce MaterialAttributeType::Bool and everything kinda explodes with that. Seriously, what were the people in 1979 thinking. --- src/Magnum/Platform/AbstractXApplication.h | 6 ++++++ src/Magnum/Platform/WindowlessEglApplication.h | 6 ++++++ src/Magnum/Platform/WindowlessGlxApplication.h | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/src/Magnum/Platform/AbstractXApplication.h b/src/Magnum/Platform/AbstractXApplication.h index 1231ccc64..6eb9cb9cb 100644 --- a/src/Magnum/Platform/AbstractXApplication.h +++ b/src/Magnum/Platform/AbstractXApplication.h @@ -40,6 +40,7 @@ #include /* undef Xlib nonsense to avoid conflicts */ #undef Always +#undef Bool #undef Complex #undef Convex #undef None @@ -51,6 +52,11 @@ #undef Button4 #undef Button5 +#ifndef DOXYGEN_GENERATING_OUTPUT +/* Unfortunately Xlib *needs* the Bool type, so provide a typedef instead */ +typedef int Bool; +#endif + #include "Magnum/Magnum.h" #include "Magnum/Tags.h" #include "Magnum/GL/GL.h" diff --git a/src/Magnum/Platform/WindowlessEglApplication.h b/src/Magnum/Platform/WindowlessEglApplication.h index dd250f2b4..44c5ec3b6 100644 --- a/src/Magnum/Platform/WindowlessEglApplication.h +++ b/src/Magnum/Platform/WindowlessEglApplication.h @@ -37,12 +37,18 @@ #include /* undef Xlib nonsense to avoid conflicts */ #undef Always +#undef Bool #undef Complex #undef None #undef Status #include #include +#ifndef DOXYGEN_GENERATING_OUTPUT +/* Unfortunately Xlib *needs* the Bool type, so provide a typedef instead */ +typedef int Bool; +#endif + #include "Magnum/Magnum.h" #include "Magnum/GL/OpenGL.h" #include "Magnum/Tags.h" diff --git a/src/Magnum/Platform/WindowlessGlxApplication.h b/src/Magnum/Platform/WindowlessGlxApplication.h index 6f3fcf1d2..7fb71f198 100644 --- a/src/Magnum/Platform/WindowlessGlxApplication.h +++ b/src/Magnum/Platform/WindowlessGlxApplication.h @@ -46,6 +46,7 @@ #include /* undef Xlib nonsense to avoid conflicts */ #undef Always +#undef Bool #undef Complex #undef Convex #undef None @@ -57,6 +58,11 @@ #undef Button4 #undef Button5 +#ifndef DOXYGEN_GENERATING_OUTPUT +/* Unfortunately Xlib *needs* the Bool type, so provide a typedef instead */ +typedef int Bool; +#endif + namespace Magnum { namespace Platform { /**