From: Ben Pfaff Date: Thu, 4 Sep 2008 18:13:11 +0000 (-0700) Subject: Tolerate existing definitions of MIN, MAX macros. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=412c3875c2acc76be9c398f2e5dda88f4e60b054;p=openvswitch Tolerate existing definitions of MIN, MAX macros. Enables partner builds. --- diff --git a/include/util.h b/include/util.h index 99319d4c..604c841d 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()