summaryrefslogtreecommitdiff
path: root/src/utils.h
diff options
context:
space:
mode:
authorRan Benita <ran@unusedvar.com>2019-12-27 12:34:49 +0200
committerRan Benita <ran@unusedvar.com>2019-12-27 12:34:49 +0200
commit34122f9f064bff220e066a036315daa0778cfd54 (patch)
tree5adb88e17aed98d692064f0cdd9914742b999bad /src/utils.h
parentade131307c7fda83707d615216831a056f9d1c98 (diff)
downloadxorg-lib-libxkbcommon-34122f9f064bff220e066a036315daa0778cfd54.tar.gz
utils: use MIN/MAX instead of min/max
min/max symbols conflict on some systems (msvc), so just use the macros. Signed-off-by: Ran Benita <ran@unusedvar.com>
Diffstat (limited to 'src/utils.h')
-rw-r--r--src/utils.h14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/utils.h b/src/utils.h
index ebf3601..c012651 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -110,18 +110,6 @@ memdup(const void *mem, size_t nmemb, size_t size)
return p;
}
-static inline int
-min(int misc, int other)
-{
- return (misc < other) ? misc : other;
-}
-
-static inline int
-max(int misc, int other)
-{
- return (misc > other) ? misc : other;
-}
-
/* ctype.h is locale-dependent and has other oddities. */
static inline bool
is_space(char ch)
@@ -194,9 +182,7 @@ unmap_file(char *string, size_t size);
#define ARRAY_SIZE(arr) ((sizeof(arr) / sizeof(*(arr))))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
-#define MIN3(a, b, c) MIN(MIN((a), (b)), (c))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
-#define MAX3(a, b, c) MAX(MAX((a), (b)), (c))
/* Round up @a so it's divisible by @b. */
#define ROUNDUP(a, b) (((a) + (b) - 1) / (b) * (b))