summaryrefslogtreecommitdiffstats
path: root/usr.bin/make
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2005-03-31 11:12:45 +0000
committerharti <harti@FreeBSD.org>2005-03-31 11:12:45 +0000
commitbdea8226c76f65a9faa907ff77ecec223db5e6f7 (patch)
tree2d504bcd632a93d8bd52642a3aa39b4727f758f4 /usr.bin/make
parent2379f6177018b1f39ea760b905f7535cadd5a2a1 (diff)
downloadFreeBSD-src-bdea8226c76f65a9faa907ff77ecec223db5e6f7.zip
FreeBSD-src-bdea8226c76f65a9faa907ff77ecec223db5e6f7.tar.gz
Move the MAX macro to a util.h so it becomes usable in other modules.
Suggested by: Max Okumoto <okumoto@ucsd.edu>
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/buf.c4
-rw-r--r--usr.bin/make/util.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/make/buf.c b/usr.bin/make/buf.c
index b4e86dd..a6e0aa1 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 bcb8eff..44d3d9e 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 *, ...);
OpenPOWER on IntegriCloud