[Mesa-dev] [PATCH 2/4] mesa: Prevent collision of ERROR define on Windows.

jose.r.fonseca at gmail.com jose.r.fonseca at gmail.com
Sun Mar 11 03:47:21 PDT 2012


From: José Fonseca <jose.r.fonseca at gmail.com>

This issue might recur on other OSes. If so then it might be better
to remove the C-preprocessor magic, and use fully qualified defines
instead.
---
 src/mesa/main/errors.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c
index 611c77d..2256100 100644
--- a/src/mesa/main/errors.c
+++ b/src/mesa/main/errors.c
@@ -55,6 +55,9 @@ static char out_of_memory[] = "Debugging error: out of memory";
 #define source_is(s, kind) enum_is(s, SOURCE, kind)
 #define type_is(t, kind) enum_is(t, TYPE, kind)
 
+/* Prevent define collision on Windows */
+#undef ERROR
+
 enum {
    SOURCE_APPLICATION,
    SOURCE_THIRD_PARTY,
-- 
1.7.9.1



More information about the mesa-dev mailing list