mirror of
https://github.com/fltk/fltk.git
synced 2026-05-22 07:01:34 +08:00
Don't depend on having RTLD_DEFAULT defined
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5684 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -448,8 +448,19 @@ GLUTproc glutGetProcAddress(const char *procName) {
|
||||
|
||||
snprintf(symbol, sizeof(symbol), "_%s", procName);
|
||||
|
||||
# ifdef RTLD_DEFAULT
|
||||
return (GLUTproc)dlsym(RTLD_DEFAULT, symbol);
|
||||
|
||||
# else // No RTLD_DEFAULT support, so open the current a.out symbols...
|
||||
static void *rtld_default = 0;
|
||||
|
||||
if (!rtld_default) rtld_default = dlopen(0, RTLD_LAZY);
|
||||
|
||||
if (rtld_default) return (GLUTproc)dlsym(rtld_default, symbol);
|
||||
else return 0;
|
||||
|
||||
# endif // RTLD_DEFAULT
|
||||
|
||||
# elif defined(HAVE_GLXGETPROCADDRESSARB)
|
||||
return (GLUTproc)glXGetProcAddressARB((const GLubyte *)procName);
|
||||
|
||||
@@ -485,8 +496,6 @@ int glutExtensionSupported( const char* extension )
|
||||
/* skip the false match and continue */
|
||||
extensions = p + len;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif // HAVE_GL
|
||||
|
||||
Reference in New Issue
Block a user