Fixed bug 1782 - SDL_opengl.h header disabled on FreeBSD
authorSam Lantinga <slouken@libsdl.org>
Mon, 01 Apr 2013 23:15:21 -0700
changeset 70426460bf6d33cf
parent 7041 eb0b541c9722
child 7043 fb7b426ab660
Fixed bug 1782 - SDL_opengl.h header disabled on FreeBSD

q66

The SDL_opengl.h header contains this:

#ifdef __FreeBSD__ /* !!! FIXME: temp compiler warning fix... */
#define NO_SDL_GLEXT 1
#endif

However, I can't seem to find what kind of compiler warning it was and it makes it unusable to use on FreeBSD. If I comment out these lines on my machine, everything works fine - I use FreeBSD 9-STABLE (x86_64, gcc and clang both, the same in a x86 chroot). All I could find is that this was causing an error on FreeBSD 8, but I can't test that on my machine (maybe if I set up some FreeBSD 8 chroot).

I set up a 8.2 chroot and investigated the problem. Apparently this issue was fixed in Mesa 7.6 (and in Git, June 4 2009, but it didn't get into 7.5). By the time those lines were added, FreeBSD contained the libGL port version 7.4.4, which suffered from the issue, but on April 2012 the version was updated to 7.6, which is available for FreeBSD 8 and FreeBSD 9 alike, which means those three lines should be safe to remove (it'll work fine for everyone with sufficiently up to date ports).
include/SDL_opengl.h
     1.1 --- a/include/SDL_opengl.h	Mon Apr 01 13:21:23 2013 -0300
     1.2 +++ b/include/SDL_opengl.h	Mon Apr 01 23:15:21 2013 -0700
     1.3 @@ -44,10 +44,6 @@
     1.4  #define NO_SDL_GLEXT 1
     1.5  #endif
     1.6  
     1.7 -#ifdef __FreeBSD__  /* !!! FIXME: temp compiler warning fix... */
     1.8 -#define NO_SDL_GLEXT 1
     1.9 -#endif
    1.10 -
    1.11  #ifdef __glext_h_
    1.12  /* Someone has already included glext.h */
    1.13  #define NO_SDL_GLEXT