+
+// Casting between function and data pointers is invalid C++ (but we need to
+// do it for OpenGL to work at all (yay!), so use gcc __extension__ operator
+// to silence warnings and errors here.
+typedef void (*func_ptr)();
+
+func_ptr IntGetProcAddress(const char *name)
+{
+#ifdef __GNUC__
+ __extension__ func_ptr fn = reinterpret_cast<func_ptr>(SDL_GL_GetProcAddress(name));
+ return fn;
+#else
+ return (func_ptr)SDL_GL_GetProcAddress(name);
+#endif
+}