From: kakaroto Date: Sat, 15 Oct 2011 09:30:33 +0000 (+0000) Subject: Evas: Remove a useless ifdef that was causing dead code. X-Git-Tag: accepted/2.0/20130306.225542~195^2~71 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69edb9ff98a66b07f2a12153c638e68b61681a5e;p=profile%2Fivi%2Fevas.git Evas: Remove a useless ifdef that was causing dead code. You can't compile a gl_common .c file based on whether or not the SDL header was included. The .c file will result in only one .o and since the Evas_Engine_Sdl.h is not included by evas_gl_context.c itself, then that ifdef will never be true. gl_common should request a callback function pointer from the evas engine for doing symbol resolution. This needs a refactor. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@64086 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/modules/engines/gl_common/evas_gl_context.c b/src/modules/engines/gl_common/evas_gl_context.c index 49551f5..133cb0b 100644 --- a/src/modules/engines/gl_common/evas_gl_context.c +++ b/src/modules/engines/gl_common/evas_gl_context.c @@ -48,11 +48,11 @@ gl_symbols(void) if (sym_done) return; sym_done = 1; -#ifdef _EVAS_ENGINE_SDL_H -# define FINDSYM(dst, sym, typ) if (!dst) dst = (typ)SDL_GL_GetProcAddress(sym) -#else -# define FINDSYM(dst, sym, typ) if (!dst) dst = (typ)dlsym(RTLD_DEFAULT, sym) -#endif + /* FIXME: If using the SDL engine, we should use SDL_GL_GetProcAddress + * instead of dlsym + * if (!dst) dst = (typ)SDL_GL_GetProcAddress(sym) + */ +#define FINDSYM(dst, sym, typ) if (!dst) dst = (typ)dlsym(RTLD_DEFAULT, sym) #define FALLBAK(dst, typ) if (!dst) dst = (typ)sym_missing; FINDSYM(glsym_glGenFramebuffers, "glGenFramebuffers", glsym_func_void);