GL_SGIX_fragment_specular_lighting (PATCH)

Using glew (http://glew.sf.net) and CVS SDL together causes the following
compiler errors (when including GL/GLEW.h and SDL.h in the same file):

In file included from glew.c:11:
/home/cournia/local/include/SDL/SDL_opengl.h:4347: conflicting types for
typedef void (*PFNGLFRAGMENTLIGHTFVSGIXPROC) (unsigned int, unsigned int, const GLfloat *)' /home/cournia/local/include/GL/glew.h:6830: previous declaration astypedef void
(*PFNGLFRAGMENTLIGHTFVSGIXPROC) (unsigned int, unsigned int, GLfloat *)’
/home/cournia/local/include/SDL/SDL_opengl.h:4349: conflicting types for
typedef void (*PFNGLFRAGMENTLIGHTIVSGIXPROC) (unsigned int, unsigned int, const GLint *)' /home/cournia/local/include/GL/glew.h:6832: previous declaration astypedef void
(*PFNGLFRAGMENTLIGHTIVSGIXPROC) (unsigned int, unsigned int, GLint *)’
/home/cournia/local/include/SDL/SDL_opengl.h:4351: conflicting types for
typedef void (*PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (unsigned int, const GLfloat *)' /home/cournia/local/include/GL/glew.h:6826: previous declaration astypedef void
(*PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (unsigned int, GLfloat *)’
/home/cournia/local/include/SDL/SDL_opengl.h:4353: conflicting types for
typedef void (*PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (unsigned int, const GLint *)' /home/cournia/local/include/GL/glew.h:6828: previous declaration astypedef void
(*PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (unsigned int, GLint *)’
/home/cournia/local/include/SDL/SDL_opengl.h:4360: conflicting types for
typedef void (*PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (unsigned int, unsigned int, GLfloat *)' /home/cournia/local/include/GL/glew.h:6839: previous declaration astypedef void
(*PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (unsigned int, unsigned int, const
GLfloat *)’
/home/cournia/local/include/SDL/SDL_opengl.h:4361: conflicting types for
typedef void (*PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (unsigned int, unsigned int, GLint *)' /home/cournia/local/include/GL/glew.h:6840: previous declaration astypedef void
(*PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (unsigned int, unsigned int, const
GLint *)’

The following patch should fix the error:===================================================================
RCS file: /home/sdlweb/libsdl.org/cvs/SDL12/include/SDL_opengl.h,v
retrieving revision 1.6.2.1
diff -r1.6.2.1 SDL_opengl.h
1476c1476
< #ifndef GL_SGIX_fragment_lighting

#ifndef GL_SGIX_fragment_specular_lighting
4323,4324c4323,4324
< #ifndef GL_SGIX_fragment_lighting
< #define GL_SGIX_fragment_lighting 1


#ifndef GL_SGIX_fragment_specular_lighting
#define GL_SGIX_fragment_specular_lighting 1

The patch renames the symbol GL_SGIX_fragment_lighting (which isn’t even
an extension as far as I can tell from
http://oss.sgi.com/projects/ogl-sample/registry/) to the correct extension
name GL_SGIX_fragment_specular_lighting.

Hope this helps!

nathan