summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2009-06-16 17:52:05 +0200
committerThomas Hellstrom <thellstrom@vmware.com>2009-06-17 03:07:00 +0200
commitc9f19571da2673a934f6f97aeea92c5414c28925 (patch)
treec9178b062603418ab8d91de900d78076ccca33e0
parentedbec6b112468cf8fa5546aaecb2832c91352127 (diff)
mesa driconf: Add macro to specify an option with a quoted default value.
The default values true and false will expand to "1" and "0" when gcc -std=c99, causing bool option defaults to generate runtime failures. One solution is to specify bool option defaults quoted as "true" and "false". Add a macro to assist this. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
-rw-r--r--src/mesa/drivers/dri/common/xmlpool.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/xmlpool.h b/src/mesa/drivers/dri/common/xmlpool.h
index 7fbc6e800d..587517ea10 100644
--- a/src/mesa/drivers/dri/common/xmlpool.h
+++ b/src/mesa/drivers/dri/common/xmlpool.h
@@ -60,6 +60,10 @@
#define DRI_CONF_OPT_BEGIN(name,type,def) \
"<option name=\""#name"\" type=\""#type"\" default=\""#def"\">\n"
+/** \brief Begin an option definition with qouted default value */
+#define DRI_CONF_OPT_BEGIN_Q(name,type,def) \
+"<option name=\""#name"\" type=\""#type"\" default="#def">\n"
+
/** \brief Begin an option definition with restrictions on valid values */
#define DRI_CONF_OPT_BEGIN_V(name,type,def,valid) \
"<option name=\""#name"\" type=\""#type"\" default=\""#def"\" valid=\""valid"\">\n"