aboutsummaryrefslogtreecommitdiffstats
path: root/openbsd/OpenBSDProcessList.h
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2016-04-11 13:01:17 +0200
committerDaniel Lange <DLange@git.local>2016-04-11 13:01:17 +0200
commit8c82a38002ce09db2a0b83dab8b598cf1ab0596c (patch)
tree596b13ab61b4454e347ff476a84c14c2c9dc3441 /openbsd/OpenBSDProcessList.h
parentff9409b1737627857eb47f64f536a3f66b6a09a4 (diff)
downloaddebian_htop-8c82a38002ce09db2a0b83dab8b598cf1ab0596c.tar.gz
debian_htop-8c82a38002ce09db2a0b83dab8b598cf1ab0596c.tar.bz2
debian_htop-8c82a38002ce09db2a0b83dab8b598cf1ab0596c.zip
Imported Upstream version 2.0.1upstream/2.0.1
Diffstat (limited to 'openbsd/OpenBSDProcessList.h')
-rw-r--r--openbsd/OpenBSDProcessList.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/openbsd/OpenBSDProcessList.h b/openbsd/OpenBSDProcessList.h
index 192fb34..ba9e6d1 100644
--- a/openbsd/OpenBSDProcessList.h
+++ b/openbsd/OpenBSDProcessList.h
@@ -27,10 +27,20 @@ typedef struct OpenBSDProcessList_ {
} OpenBSDProcessList;
-#ifndef CLAMP
-#define CLAMP(x,low,high) (((x)>(high))?(high):(((x)<(low))?(low):(x)))
+/*
+ * avoid relying on or conflicting with MIN() and MAX() in sys/param.h
+ */
+#ifndef MINIMUM
+#define MINIMUM(x, y) ((x) > (y) ? (y) : (x))
#endif
+#ifndef MAXIMUM
+#define MAXIMUM(x, y) ((x) > (y) ? (x) : (y))
+#endif
+
+#ifndef CLAMP
+#define CLAMP(x, low, high) (((x) > (high)) ? (high) : MAXIMUM(x, low))
+#endif
ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);

© 2014-2024 Faster IT GmbH | imprint | privacy policy