projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4782d87
)
Tolerate existing definitions of MIN, MAX macros.
author
Ben Pfaff
<blp@nicira.com>
Thu, 4 Sep 2008 18:13:11 +0000
(11:13 -0700)
committer
Ben Pfaff
<blp@nicira.com>
Thu, 4 Sep 2008 20:53:26 +0000
(13:53 -0700)
Enables partner builds.
include/util.h
patch
|
blob
|
history
diff --git
a/include/util.h
b/include/util.h
index 99319d4cf64b0ded5ac2b992c25901a6c7fd6bb6..604c841d01b1ffc2e005cbc753013b4cd44c1eff 100644
(file)
--- 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()