comparison src/video/x11/SDL_x11gl.c @ 26:c447d5b9275d

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.
author Sam Lantinga <slouken@lokigames.com>
date Thu, 10 May 2001 20:31:51 +0000
parents 74212992fb08
children a8360daed17d
comparison
equal deleted inserted replaced
25:3fbf86244fd2 26:c447d5b9275d
341 #else 341 #else
342 dlopen_flags = RTLD_LAZY; 342 dlopen_flags = RTLD_LAZY;
343 #endif 343 #endif
344 handle = dlopen(path, dlopen_flags); 344 handle = dlopen(path, dlopen_flags);
345 /* Catch the case where the application isn't linked with GL */ 345 /* Catch the case where the application isn't linked with GL */
346 #if defined __OpenBSD__ && !defined __ELF__
347 #define dlsym(x,y) dlsym(x, "_" y)
348 #endif
346 if ( (dlsym(handle, "glXChooseVisual") == NULL) && (path == NULL) ) { 349 if ( (dlsym(handle, "glXChooseVisual") == NULL) && (path == NULL) ) {
347 dlclose(handle); 350 dlclose(handle);
348 path = getenv("SDL_VIDEO_GL_DRIVER"); 351 path = getenv("SDL_VIDEO_GL_DRIVER");
349 if ( path == NULL ) { 352 if ( path == NULL ) {
350 path = DEFAULT_OPENGL; 353 path = DEFAULT_OPENGL;