Skip to content

Commit

Permalink
Platform: Xlib strikes again, this time with #define Bool int.
Browse files Browse the repository at this point in the history
THe new MaterialData APIs introduce MaterialAttributeType::Bool and
everything kinda explodes with that.

Seriously, what were the people in 1979 thinking.
  • Loading branch information
mosra committed Aug 16, 2020
1 parent 3ffcdf1 commit 4cd50b0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Magnum/Platform/AbstractXApplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <X11/Xutil.h>
/* undef Xlib nonsense to avoid conflicts */
#undef Always
#undef Bool
#undef Complex
#undef Convex
#undef None
Expand All @@ -51,6 +52,9 @@
#undef Button4
#undef Button5

/* Unfortunately Xlib *needs* the Bool type, so provide a typedef instead */
typedef int Bool;

#include "Magnum/Magnum.h"
#include "Magnum/Tags.h"
#include "Magnum/GL/GL.h"
Expand Down
4 changes: 4 additions & 0 deletions src/Magnum/Platform/WindowlessEglApplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,16 @@
#include <EGL/eglext.h>
/* undef Xlib nonsense to avoid conflicts */
#undef Always
#undef Bool
#undef Complex
#undef None
#undef Status
#include <Corrade/Containers/EnumSet.h>
#include <Corrade/Containers/Pointer.h>

/* Unfortunately Xlib *needs* the Bool type, so provide a typedef instead */
typedef int Bool;

#include "Magnum/Magnum.h"
#include "Magnum/GL/OpenGL.h"
#include "Magnum/Tags.h"
Expand Down
4 changes: 4 additions & 0 deletions src/Magnum/Platform/WindowlessGlxApplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <X11/Xutil.h>
/* undef Xlib nonsense to avoid conflicts */
#undef Always
#undef Bool
#undef Complex
#undef Convex
#undef None
Expand All @@ -57,6 +58,9 @@
#undef Button4
#undef Button5

/* Unfortunately Xlib *needs* the Bool type, so provide a typedef instead */
typedef int Bool;

namespace Magnum { namespace Platform {

/**
Expand Down

0 comments on commit 4cd50b0

Please sign in to comment.