Add a MIN macro
authorJason Ekstrand <jason@jlekstrand.net>
Thu, 27 Jun 2013 03:20:30 +0000 (22:20 -0500)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 3 Jul 2013 18:52:05 +0000 (14:52 -0400)
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
src/compositor.h

index bd6344d..6d2c683 100644 (file)
@@ -36,6 +36,10 @@ extern "C" {
 #include "matrix.h"
 #include "config-parser.h"
 
+#ifndef MIN
+#define MIN(x,y) (((x) < (y)) ? (x) : (y))
+#endif
+
 #define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
 
 #define container_of(ptr, type, member) ({                             \