summaryrefslogtreecommitdiff
path: root/src/include/stdlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/stdlib.h')
-rw-r--r--src/include/stdlib.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/stdlib.h b/src/include/stdlib.h
index 44d7c0126b..9bc0ebc97b 100644
--- a/src/include/stdlib.h
+++ b/src/include/stdlib.h
@@ -12,6 +12,9 @@
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define MAX(a,b) ((a) > (b) ? (a) : (b))
+#define ABS(a) (((a) < 0) ? (-(a)) : (a))
+#define CEIL_DIV(a, b) (((a) + (b) - 1) / (b))
+#define IS_POWER_OF_2(x) (((x) & ((x) - 1)) == 0)
#define min(a,b) MIN((a),(b))
#define max(a,b) MAX((a),(b))