>From 9d328847722ce401097bfb32e93f3b7a9d76f73a Mon Sep 17 00:00:00 2001
From: Sam Spilsbury <[email protected]>
Date: Fri, 23 Sep 2011 00:24:09 +0800
Subject: [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.

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

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to