summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-28 13:19:42 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-28 13:19:42 -0400
commit3d1e99d01bc0142397cd0dd8be41d001f0f66131 (patch)
treee4f9721aeaeeae583c25bfdfa9544e0b64aee9de /src/common
parent8736892679eabeecfa87f9bf19ac22245dc711c0 (diff)
downloadtor-3d1e99d01bc0142397cd0dd8be41d001f0f66131.tar.gz
tor-3d1e99d01bc0142397cd0dd8be41d001f0f66131.zip
Move MIN and MAX into lib/intmath/cmp.h
Diffstat (limited to 'src/common')
-rw-r--r--src/common/compat.h14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/common/compat.h b/src/common/compat.h
index 43e98d906c..ec4df1cc55 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -60,6 +60,7 @@
#include "lib/fs/mmap.h"
#include "lib/fs/userdb.h"
#include "lib/wallclock/timeval.h"
+#include "lib/intmath/cmp.h"
#include <stdio.h>
#include <errno.h>
@@ -92,19 +93,6 @@ typedef unsigned long rlim_t;
int set_max_file_descriptors(rlim_t limit, int *max);
MOCK_DECL(int, get_total_system_memory, (size_t *mem_out));
-/** Macros for MIN/MAX. Never use these when the arguments could have
- * side-effects.
- * {With GCC extensions we could probably define a safer MIN/MAX. But
- * depending on that safety would be dangerous, since not every platform
- * has it.}
- **/
-#ifndef MAX
-#define MAX(a,b) ( ((a)<(b)) ? (b) : (a) )
-#endif
-#ifndef MIN
-#define MIN(a,b) ( ((a)>(b)) ? (b) : (a) )
-#endif
-
ssize_t tor_getpass(const char *prompt, char *output, size_t buflen);
/* This needs some of the declarations above so we include it here. */