aboutsummaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h
index 7030e4b..2dffe2a 100644
--- a/src/common.h
+++ b/src/common.h
@@ -19,4 +19,15 @@
#define MPQ_IS_INIT(x) (mpq_denref(x)->_mp_d != NULL)
+/* Some headers like <sys/param.h> may define these */
+#ifdef MIN
+# undef MIN
+#endif
+#ifdef MAX
+# undef MAX
+#endif
+
+#define MIN(x, y) ((x) < (y) ? (x) : (y))
+#define MAX(x, y) ((x) > (y) ? (x) : (y))
+
#endif /* !ORYX_COMMON_H */