summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-06-30 15:56:17 -0400
committerJakob Kaivo <jkk@ung.org>2020-06-30 15:56:17 -0400
commit30779981519a03506e515851a760a1f1f5a98a23 (patch)
tree4c7726e6b1e988aa04a351da99d93dd53c138f67 /include
parent9a1d1230d08dd16ce49ce8b5253693bfe711fd5b (diff)
use consistent MA_ prefix
Diffstat (limited to 'include')
-rw-r--r--include/mapalloc.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/include/mapalloc.h b/include/mapalloc.h
index f4a4434..65581c8 100644
--- a/include/mapalloc.h
+++ b/include/mapalloc.h
@@ -3,9 +3,16 @@
#include <stddef.h> /* for the definition of size_t */
-void *map_malloc(size_t n);
-void *map_calloc(size_t nelem, size_t elsize);
-void *map_realloc(void *ptr, size_t n);
-void map_free(void *ptr);
+void *MA_malloc(size_t n);
+void *MA_calloc(size_t nelem, size_t elsize);
+void *MA_realloc(void *ptr, size_t n);
+void MA_free(void *ptr);
+
+#ifdef MA_OVERRIDE_STDLIB
+#define malloc(n) MA_malloc(n)
+#define calloc(n, e) MA_calloc(n, e)
+#define realloc(p, n) MA_realloc(p, n)
+#define free(p) MA_free(p)
+#endif
#endif