From 6a61fd073c5b0ab637b4ba06e8447b6f08c2185a Mon Sep 17 00:00:00 2001 From: Gustav Behm Date: Tue, 15 Jun 2021 11:25:14 +0200 Subject: [PATCH] Handle already defined MAX and MIN macros --- include/r/util.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/r/util.h b/include/r/util.h index 318a816..7cc7b80 100644 --- a/include/r/util.h +++ b/include/r/util.h @@ -2,8 +2,14 @@ #define LENGTH(xs) (sizeof(xs)/sizeof((xs)[0])) #define LIT(x) x,sizeof(x) + +#ifndef MAX #define MAX(a,b) ((a) > (b) ? (a) : (b)) +#endif + +#ifndef MIN #define MIN(a,b) ((a) < (b) ? (a) : (b)) +#endif const char* getenv_mandatory(const char* const env);