Use a NULL for the path passed to dlopen, that means 'give me a handle to the loaded image' which at the point where this function is called already included all libGL's symbols. Makes the whole thing easier to maintain.

git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@109 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
mem 2003-07-29 08:41:51 +00:00
parent 397ac3fd63
commit 5fe5fa1f4d
2 changed files with 4 additions and 4 deletions

View File

@ -78,7 +78,7 @@ ifeq ($(patsubst IRIX%,IRIX,$(SYSTEM)), IRIX)
CC = cc
EXTRA_CCFLAGS =
EXTRA_LDFALGS =
EXTRA_CPPFLAGS = -DGLEW_NEEDS_CUSTOM_GET_PROCADDRESS=1 -DGLEW_OPENGL_LIB_PATH=\"libGL.so\"
EXTRA_CPPFLAGS = -DGLEW_NEEDS_CUSTOM_GET_PROCADDRESS=1
NAME = GLEW
P.BIN =
WARN = -fullwarn

View File

@ -55,11 +55,11 @@ static void * __dlopenGetProcAddress(const GLubyte *procName)
if (!h)
{
if (!(h = dlopen(GLEW_OPENGL_LIB_PATH, RTLD_LAZY | RTLD_LOCAL)))
if (!(h = dlopen(NULL, RTLD_LAZY | RTLD_LOCAL)))
{
fprintf(stderr,
"E: GLEW failed to dlopen %s: %s.\nAbort.\n",
GLEW_OPENGL_LIB_PATH, dlerror());
"E: GLEW failed to dlopen myself: %s.\nAbort.\n",
dlerror());
exit(100);
}