From e3e2309eccbd742a868986e8bef75db48510155d Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 27 Jun 2013 14:40:17 -0700 Subject: [PATCH] glxwraps: Fix fips for programs that call glXGetProcAddress Previously, fips would work for programs calling glXGetProcAddressARB but not for programs calling glXGetProcAddress. Thanks to the recently-added test suite for noticing this bug. --- glxwrap.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/glxwrap.c b/glxwrap.c index 799a019..d7d4191 100644 --- a/glxwrap.c +++ b/glxwrap.c @@ -40,7 +40,7 @@ glXSwapBuffers (Display *dpy, GLXDrawable drawable) } /* glXGetProcAddressARB is a function which accepts a string and - * returns a generic function pointer (which nominall accepts void and + * returns a generic function pointer (which nominally 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. @@ -60,6 +60,17 @@ void (*glXGetProcAddressARB (const GLubyte *func))(void) return ret; } +void (*glXGetProcAddress (const GLubyte *func))(void) +{ + /* This comment must not be removed. It ensures that the + * glXGetProcAddress function ends up in our exported symbol + * list even though there's not otherwise any code saying: + * + * GLWRAP_DEFER_WITH_RETURN (ret, glXGetProcAddress, func); + */ + return glXGetProcAddressARB(func); +} + Bool glXMakeCurrent (Display *dpy, GLXDrawable drawable, GLXContext ctx) { -- 2.43.0