aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorHartmut Brandt <harti@FreeBSD.org>2005-03-31 11:12:45 +0000
committerHartmut Brandt <harti@FreeBSD.org>2005-03-31 11:12:45 +0000
commitae6bff540a123c63b06decd39688b650e832dc7e (patch)
tree2d504bcd632a93d8bd52642a3aa39b4727f758f4 /usr.bin
parent9477d73e32ad9e33f3102d8c545489d7f3f2af7a (diff)
downloadsrc-ae6bff540a123c63b06decd39688b650e832dc7e.tar.gz
src-ae6bff540a123c63b06decd39688b650e832dc7e.zip
Move the MAX macro to a util.h so it becomes usable in other modules.
Suggested by: Max Okumoto <okumoto@ucsd.edu>
Notes
Notes: svn path=/head/; revision=144386
Diffstat (limited to 'usr.bin')
-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 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 *, ...);