From df45d850b7d43d71772853912b0c1c2cbfe50ecb Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Mon, 30 Apr 2012 18:07:51 +0000 Subject: [PATCH] Add MIN/MAX macros if not already present. --- pkg.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg.h b/pkg.h index bd5e653..13f1420 100644 --- a/pkg.h +++ b/pkg.h @@ -58,6 +58,14 @@ typedef struct tuple_ pkg_tuple_t; #define LOCAL_COPY(a) \ strcpy(alloca(strlen(a) + 1), a) +#ifndef MIN +# define MIN(a,b) (((a) < (b)) ? (a) : (b)) +#endif + +#ifndef MAX +# define MAX(a,b) (((a) > (b)) ? (a) : (b)) +#endif + struct dependency_ { struct dependency_ *prev, *next;