metrics_end_frame ();
}
-
-typedef __GLXextFuncPtr (* fips_glXGetProcAddressARB_t)(const GLubyte *func);
-__GLXextFuncPtr
-glXGetProcAddressARB (const GLubyte *func)
+/* glXGetProcAddressARB is a function which accepts a string and
+ * returns a generic function pointer (which nominall accepts void and
+ * has void return type). Of course, the user is expected to cast the
+ * returned function pointer to a function pointer of the expected
+ * type.
+ */
+void (*glXGetProcAddressARB (const GLubyte *func))(void)
{
- __GLXextFuncPtr ptr;
- static fips_glXGetProcAddressARB_t real_glXGetProcAddressARB = NULL;
+ void *ptr;
+ static typeof(&glXGetProcAddressARB) glxwrap_real_glXGetProcAddressARB = NULL;
char *name = "glXGetProcAddressARB";
- if (! real_glXGetProcAddressARB) {
- real_glXGetProcAddressARB = glwrap_lookup (name);
- if (! real_glXGetProcAddressARB) {
+ if (! glxwrap_real_glXGetProcAddressARB) {
+ glxwrap_real_glXGetProcAddressARB = glwrap_lookup (name);
+ if (! glxwrap_real_glXGetProcAddressARB) {
fprintf (stderr, "Error: Failed to find function %s.\n",
name);
return NULL;
return ptr;
/* Otherwise, just defer to the real glXGetProcAddressARB. */
- return real_glXGetProcAddressARB (func);
+ return glxwrap_real_glXGetProcAddressARB (func);
}