Browse Source

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.
pull/459/head
Vladimír Vondruš 6 years ago
parent
commit
8c5a2d6a88
  1. 6
      src/Magnum/Platform/AbstractXApplication.h
  2. 6
      src/Magnum/Platform/WindowlessEglApplication.h
  3. 6
      src/Magnum/Platform/WindowlessGlxApplication.h

6
src/Magnum/Platform/AbstractXApplication.h

@ -40,6 +40,7 @@
#include <X11/Xutil.h>
/* 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"

6
src/Magnum/Platform/WindowlessEglApplication.h

@ -37,12 +37,18 @@
#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>
#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"

6
src/Magnum/Platform/WindowlessGlxApplication.h

@ -46,6 +46,7 @@
#include <X11/Xutil.h>
/* 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 {
/**

Loading…
Cancel
Save