From 412c3875c2acc76be9c398f2e5dda88f4e60b054 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 4 Sep 2008 11:13:11 -0700 Subject: [PATCH] Tolerate existing definitions of MIN, MAX macros. Enables partner builds. --- include/util.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/util.h b/include/util.h index 99319d4cf..604c841d0 100644 --- a/include/util.h +++ b/include/util.h @@ -59,8 +59,14 @@ extern const char *program_name; #define ARRAY_SIZE(ARRAY) (sizeof ARRAY / sizeof *ARRAY) #define ROUND_UP(X, Y) (((X) + ((Y) - 1)) / (Y) * (Y)) #define ROUND_DOWN(X, Y) ((X) / (Y) * (Y)) + +#ifndef MIN #define MIN(X, Y) ((X) < (Y) ? (X) : (Y)) +#endif + +#ifndef MAX #define MAX(X, Y) ((X) > (Y) ? (X) : (Y)) +#endif #define NOT_REACHED() abort() #define NOT_IMPLEMENTED() abort() -- 2.43.0