[PATCH] Check for existing definitions of TRUE, FALSE, MINSHORT and MAXSHORT before redefining them as otherwise we may explicitly redefine what another library has done.
Sam Spilsbury
sam.spilsbury at canonical.com
Thu Sep 22 09:24:09 PDT 2011
---
include/X11/Xregion.h | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/include/X11/Xregion.h b/include/X11/Xregion.h
index c25d70b..52ffc77 100644
--- a/include/X11/Xregion.h
+++ b/include/X11/Xregion.h
@@ -56,10 +56,22 @@ typedef struct {
short x, y, width, height;
}RECTANGLE, RectangleRec, *RectanglePtr;
+#ifndef TRUE
#define TRUE 1
+#endif
+
+#ifndef FALSE
#define FALSE 0
+#endif
+
+#ifndef MAXSHORT
#define MAXSHORT 32767
+#endif
+
+#ifndef MINSHORT
#define MINSHORT -MAXSHORT
+#endif
+
#ifndef MAX
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
#endif
--
1.7.5.4
--=-3JYG0WcXzNOiWPCyhl2h--
More information about the xorg-devel
mailing list