From 2dad1298ad14029c98c9bdf663e2953c7173fbbb Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Sat, 1 Apr 2017 00:35:03 +0200 Subject: [PATCH] only define MIN/MAX if they are not defined yet This closes #72 --- tommath_private.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tommath_private.h b/tommath_private.h index bc7cd35..0e0059b 100644 --- a/tommath_private.h +++ b/tommath_private.h @@ -18,9 +18,13 @@ #include #include -#define MIN(x,y) (((x) < (y)) ? (x) : (y)) +#ifndef MIN + #define MIN(x,y) (((x) < (y)) ? (x) : (y)) +#endif -#define MAX(x,y) (((x) > (y)) ? (x) : (y)) +#ifndef MAX + #define MAX(x,y) (((x) > (y)) ? (x) : (y)) +#endif #ifdef __cplusplus extern "C" {