From 90bbc21d02b9cdc7e074884812950d27e015c2ac Mon Sep 17 00:00:00 2001 From: "Sung W. Park" Date: Wed, 13 Nov 2013 15:39:12 +0900 Subject: [PATCH] evas_gl : Fixed macro substitution bug in evas_gl In evas_gl_api_ext_def.h there're calls such as: _EVASGL_EXT_DRVNAME(EGL_KHR_image_base) The macro is defined in evas_gl_api_ext.c as: (strstr(glexts, #name) != NULL || strstr(glueexts, #name) != NULL) if (_EVASGL_EXT_CHECK_SUPPORT(name)) *ext_support = 1; But EGL_KHR_image_base is itself a macro, which is defined in EGL/eglext.h like this: Thus, the _EVASGL_EXT_CHECK_SUPPORT macro will unwrap into: (strstr(glexts, "1") != NULL || strstr(glueexts, "1") != NULL) instead of intended: (strstr(glexts, "EGL_KHR_image_base") != NULL || strstr(glueexts, "EGL_KHR_image_base") != NULL) This patch fixes this by applying stringification earlier in _EVASGL_EXT_DRVNAME Bugfix reported by jinhyung.jo@samsung.com --- src/modules/evas/engines/gl_common/evas_gl_api_ext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_api_ext.c b/src/modules/evas/engines/gl_common/evas_gl_api_ext.c index dcf5f1c..0573c6d 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_api_ext.c +++ b/src/modules/evas/engines/gl_common/evas_gl_api_ext.c @@ -184,13 +184,13 @@ re->info->info.screen); } #define _EVASGL_EXT_CHECK_SUPPORT(name) \ - (strstr(glexts, #name) != NULL || strstr(glueexts, #name) != NULL) + (strstr(glexts, name) != NULL || strstr(glueexts, name) != NULL) #define _EVASGL_EXT_DISCARD_SUPPORT() \ *ext_support = 0; #define _EVASGL_EXT_DRVNAME(name) \ - if (_EVASGL_EXT_CHECK_SUPPORT(name)) *ext_support = 1; + if (_EVASGL_EXT_CHECK_SUPPORT(#name)) *ext_support = 1; #define _EVASGL_EXT_FUNCTION_BEGIN(ret, name, param) \ { \ -- 2.7.4