summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-03-29 22:57:46 +0000
committerMartin Mares <mj@ucw.cz>2000-03-29 22:57:46 +0000
commit3ee2310c5dccebe2b63098ab478b5b1d61e4fcb2 (patch)
treec6ac34de88eb004456cfa1048e951f1b2633b1c7 /lib
parent2560c8860eeed2e352c394aec920a4f696563e6c (diff)
Avoid conflicts with libraries defining their own xmalloc by defining
xmalloc to bird_xmalloc internally.
Diffstat (limited to 'lib')
-rw-r--r--lib/resource.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/resource.h b/lib/resource.h
index 1a993978..1491fde7 100644
--- a/lib/resource.h
+++ b/lib/resource.h
@@ -80,6 +80,12 @@ void sl_free(slab *, void *);
#define xmalloc(size) _xmalloc_leap(__FILE__, __LINE__, size)
#define xfree(ptr) _xfree_leap(__FILE__, __LINE__, ptr)
#else
+/*
+ * Unfortunately, several libraries we might want to link to define
+ * their own xmalloc and we don't want to interfere with them, hence
+ * the renaming.
+ */
+#define xmalloc bird_xmalloc
void *xmalloc(unsigned);
#define xfree(x) free(x)
#endif