From: Eric Anholt Date: Thu, 3 Jan 2013 01:02:58 +0000 (-0800) Subject: mesa: Use quotes on bool driconf options to prevent stdbool.h breakage. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ea6cf2b68614e9f8d0db44ee917ce93f9ad1ac2f;p=mesa.git mesa: Use quotes on bool driconf options to prevent stdbool.h breakage. Since stdbool.h's "true" and "false" are #defines, they got expanded when used as macro arguments, and that expanded value was stored in the XML string, producing XML that driconf would then fail to parse. Currently no drivers included stdbool along with driconf, but I keep accidentally doing so on intel as we move towards using normal C. v2: rebase on master. Reviewed-by: Kenneth Graunke (v1) --- diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c index fd2971c29a0..e09fe1d38e7 100644 --- a/src/gallium/state_trackers/dri/common/dri_screen.c +++ b/src/gallium/state_trackers/dri/common/dri_screen.c @@ -54,7 +54,7 @@ PUBLIC const char __driConfigOptions[] = DRI_CONF_SECTION_END DRI_CONF_SECTION_QUALITY -/* DRI_CONF_FORCE_S3TC_ENABLE(false) */ +/* DRI_CONF_FORCE_S3TC_ENABLE("false") */ DRI_CONF_ALLOW_LARGE_TEXTURES(1) DRI_CONF_PP_CELSHADE(0) DRI_CONF_PP_NORED(0) @@ -65,12 +65,12 @@ PUBLIC const char __driConfigOptions[] = DRI_CONF_SECTION_END DRI_CONF_SECTION_DEBUG - DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN(false) - DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS(false) + DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN("false") + DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS("false") DRI_CONF_SECTION_END DRI_CONF_SECTION_MISCELLANEOUS - DRI_CONF_ALWAYS_HAVE_DEPTH_BUFFER(false) + DRI_CONF_ALWAYS_HAVE_DEPTH_BUFFER("false") DRI_CONF_SECTION_END DRI_CONF_END; diff --git a/src/mesa/drivers/dri/common/xmlpool.h b/src/mesa/drivers/dri/common/xmlpool.h index ffea430024d..ebd4e7c863a 100644 --- a/src/mesa/drivers/dri/common/xmlpool.h +++ b/src/mesa/drivers/dri/common/xmlpool.h @@ -60,6 +60,13 @@ #define DRI_CONF_OPT_BEGIN(name,type,def) \ "