From 18d350439039d11eb4ba5652f4efba38a93bea41 Mon Sep 17 00:00:00 2001 From: Christophe Favergeon Date: Mon, 30 Jan 2023 07:53:49 +0100 Subject: [PATCH] Corrected issue #85 Add compilation tests for MIN/MAX macro definitions. --- Include/dsp/utils.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Include/dsp/utils.h b/Include/dsp/utils.h index b2049a55..10f9cf20 100755 --- a/Include/dsp/utils.h +++ b/Include/dsp/utils.h @@ -40,9 +40,13 @@ extern "C" #define INDEX_MASK 0x0000003F -#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 #define SQ(x) ((x) * (x))