Date: Wed, 9 May 2001 18:03:20 -0600

From: Peter Valchev <pvalchev@openbsd.org>
Subject: openbsd patches

- The dlsym() one is supposed to fix dynamic loading on our a.out
architectures, where prefixing of an underscore symbol is required.
Actually I don't know what kind of dynamic loading does SDL deal with,
but anyway.  You may want to make that change global, but only gcc's
preprocessor passes __ELF__, I think, so you can just add Linux or
something if you decide so.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%4027
This commit is contained in:
Sam Lantinga 2001-05-10 20:31:51 +00:00
parent 2d8d773bd0
commit 874c49509f

View File

@ -343,6 +343,9 @@ int X11_GL_LoadLibrary(_THIS, const char* path)
#endif #endif
handle = dlopen(path, dlopen_flags); handle = dlopen(path, dlopen_flags);
/* Catch the case where the application isn't linked with GL */ /* Catch the case where the application isn't linked with GL */
#if defined __OpenBSD__ && !defined __ELF__
#define dlsym(x,y) dlsym(x, "_" y)
#endif
if ( (dlsym(handle, "glXChooseVisual") == NULL) && (path == NULL) ) { if ( (dlsym(handle, "glXChooseVisual") == NULL) && (path == NULL) ) {
dlclose(handle); dlclose(handle);
path = getenv("SDL_VIDEO_GL_DRIVER"); path = getenv("SDL_VIDEO_GL_DRIVER");