From bdea8226c76f65a9faa907ff77ecec223db5e6f7 Mon Sep 17 00:00:00 2001 From: harti Date: Thu, 31 Mar 2005 11:12:45 +0000 Subject: [PATCH] Move the MAX macro to a util.h so it becomes usable in other modules. Suggested by: Max Okumoto --- usr.bin/make/buf.c | 4 ---- usr.bin/make/util.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/make/buf.c b/usr.bin/make/buf.c index b4e86dd062b0..a6e0aa1bdf2c 100644 --- a/usr.bin/make/buf.c +++ b/usr.bin/make/buf.c @@ -55,10 +55,6 @@ __FBSDID("$FreeBSD$"); #include "sprite.h" #include "util.h" -#ifndef MAX -#define MAX(a,b) ((a) > (b) ? (a) : (b)) -#endif - /** * Returns the number of bytes in the buffer. Doesn't include the * null-terminating byte. diff --git a/usr.bin/make/util.h b/usr.bin/make/util.h index bcb8effa7f7b..44d3d9ed59a1 100644 --- a/usr.bin/make/util.h +++ b/usr.bin/make/util.h @@ -85,6 +85,10 @@ do { \ #define ISDOT(c) ((c)[0] == '.' && (((c)[1] == '\0') || ((c)[1] == '/'))) #define ISDOTDOT(c) ((c)[0] == '.' && ISDOT(&((c)[1]))) +#ifndef MAX +#define MAX(a, b) ((a) > (b) ? (a) : (b)) +#endif + void Debug(const char *, ...); void DebugM(const char *, ...); void Error(const char *, ...);