From cd2b77936418a034ebf39ab024af766a23f87229 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Fri, 15 Nov 2013 17:08:48 +0100 Subject: [PATCH] Fix redefinition of MIN/MAX macros warnings on recent Linux distributions --- src/robomath/robomath.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/robomath/robomath.h b/src/robomath/robomath.h index 332e526f..041c4388 100644 --- a/src/robomath/robomath.h +++ b/src/robomath/robomath.h @@ -16,9 +16,12 @@ #define DEG2RAD(a) ((a)/180.0*M_PI) #define RAD2DEG(a) ((a)*180.0/M_PI) #define DEGREES(a) RAD2DEG(a) -#define MIN(a, b) (((a) < (b)) ? (a) : (b)) -#define MAX(a, b) (((a) > (b)) ? (a) : (b)) - +#ifndef MIN +# define MIN(a, b) (((a) < (b)) ? (a) : (b)) +#endif +#ifndef MAX +# define MAX(a, b) (((a) > (b)) ? (a) : (b)) +#endif /* used to analyze angles frequency */ struct angles_freq { double angle; -- 2.39.2