From: José Fonseca Date: Thu, 1 Dec 2011 21:36:31 +0000 (+0000) Subject: Make the GLenum_int hack for MacOS robust against include order. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=937c2451d4c8aa1b433e6f607536065620e76967;p=apitrace Make the GLenum_int hack for MacOS robust against include order. --- 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