Commit a258df05 authored by Ryan C. Gordon's avatar Ryan C. Gordon

Actually, this is dumb, just simplify this for now.

 (But what if this finds the wrong symbol? We really should make this a
   ./configure test and only do one dlsym or the other depending on the
   platform...)

Reference Bugzilla #354.

--ryan.

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402255
parent 320270a1
...@@ -45,8 +45,6 @@ void *SDL_LoadFunction(void *handle, const char *name) ...@@ -45,8 +45,6 @@ void *SDL_LoadFunction(void *handle, const char *name)
{ {
void *symbol = dlsym(handle, name); void *symbol = dlsym(handle, name);
if ( symbol == NULL ) { if ( symbol == NULL ) {
#ifdef DLOPEN_NEED_UNDERSCORE
/* append an underscore for platforms that need that. */ /* append an underscore for platforms that need that. */
size_t len = 1+SDL_strlen(name)+1; size_t len = 1+SDL_strlen(name)+1;
char *_name = SDL_stack_alloc(char, len); char *_name = SDL_stack_alloc(char, len);
...@@ -54,10 +52,6 @@ void *SDL_LoadFunction(void *handle, const char *name) ...@@ -54,10 +52,6 @@ void *SDL_LoadFunction(void *handle, const char *name)
SDL_strlcpy(&_name[1], name, len); SDL_strlcpy(&_name[1], name, len);
symbol = dlsym(handle, _name); symbol = dlsym(handle, _name);
SDL_stack_free(_name); SDL_stack_free(_name);
#else
symbol = dlsym(handle, name);
#endif
if ( symbol == NULL ) { if ( symbol == NULL ) {
SDL_SetError("Failed loading %s: %s", name, (const char *)dlerror()); SDL_SetError("Failed loading %s: %s", name, (const char *)dlerror());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment