Module: Mesa
Branch: master
Commit: c9f19571da2673a934f6f97aeea92c5414c28925
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c9f19571da2673a934f6f97aeea92c5414c28925

Author: Thomas Hellstrom <[email protected]>
Date:   Tue Jun 16 17:52:05 2009 +0200

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]>

---

 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 7fbc6e8..587517e 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"

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to