From: Carl Worth Date: Mon, 29 Apr 2013 20:23:58 +0000 (-0700) Subject: Fix glwrap.c to workaround 'const' changes in OpenGL headers. X-Git-Url: https://git.cworth.org/git?p=fips;a=commitdiff_plain;h=fa324e0ec0fbd4becdb000d4b9d8c17d5b79f92a Fix glwrap.c to workaround 'const' changes in OpenGL headers. Not all OpenGL headers are created equal. Some include more "const" keywords than others, and we don't know wheter the headers we are compiling against include the extra "const". We force all to be equal by using the preprocessor to remove all "const" keywords altogether. --- diff --git a/glwrap.c b/glwrap.c index 3a789fc..c37bae3 100644 --- a/glwrap.c +++ b/glwrap.c @@ -23,6 +23,23 @@ #include "glwrap.h" +/* The prototypes for some OpenGL functions changed at one point from: + * + * const void* *indices + * to: + * const void* const coist *indices + * + * This makes it difficult for us to provide an implementation of + * these functions that is consistent with the locally-available gl.h + * since we don't know if the extra const will be present or not. + * + * To workaround this problem, we simply #define away const altogether + * before including gl.h. + * + * Kudos to Keith Packard for suggesting this kludge. + */ +#define const + #define GL_GLEXT_PROTOTYPES #include