From 937c2451d4c8aa1b433e6f607536065620e76967 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Thu, 1 Dec 2011 21:36:31 +0000 Subject: [PATCH] Make the GLenum_int hack for MacOS robust against include order. --- glimports.hpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/glimports.hpp b/glimports.hpp index d0dc0da..65b0aca 100644 --- a/glimports.hpp +++ b/glimports.hpp @@ -34,13 +34,19 @@ // Prevent including system's glext.h #define __glext_h_ + // Some functions take GLenum disguised as GLint. Apple noticed and fixed it // in the Mac OS X 10.6.x gl.h headers. Regardless, C++ typechecking rules // force the wrappers to match the prototype precisely. -#if defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_7) -#define GLenum_int GLenum +#if defined(__APPLE__) +# include // for MAC_OS_X_VERSION_10_7 +# if defined(MAC_OS_X_VERSION_10_7) +# define GLenum_int GLint +# else +# define GLenum_int GLenum +# endif #else -#define GLenum_int GLint +# define GLenum_int GLint #endif -- 2.7.4