diff options
author | Thomas Hellstrom <[email protected]> | 2009-06-16 17:52:05 +0200 |
---|---|---|
committer | Thomas Hellstrom <[email protected]> | 2009-06-17 03:07:00 +0200 |
commit | c9f19571da2673a934f6f97aeea92c5414c28925 (patch) | |
tree | c9178b062603418ab8d91de900d78076ccca33e0 /src/mesa/drivers/dri/common | |
parent | edbec6b112468cf8fa5546aaecb2832c91352127 (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 <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r-- | src/mesa/drivers/dri/common/xmlpool.h | 4 |
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 7fbc6e800d0..587517ea10a 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" |