From ea6cf2b68614e9f8d0db44ee917ce93f9ad1ac2f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 2 Jan 2013 17:02:58 -0800 Subject: [PATCH] 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) --- .../state_trackers/dri/common/dri_screen.c | 8 ++--- src/mesa/drivers/dri/common/xmlpool.h | 7 +++++ .../drivers/dri/common/xmlpool/t_options.h | 30 +++++++++---------- src/mesa/drivers/dri/intel/intel_screen.c | 28 ++++++++--------- src/mesa/drivers/dri/radeon/radeon_screen.c | 16 +++++----- 5 files changed, 48 insertions(+), 41 deletions(-) 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) \ "