From 3ee2310c5dccebe2b63098ab478b5b1d61e4fcb2 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Wed, 29 Mar 2000 22:57:46 +0000 Subject: Avoid conflicts with libraries defining their own xmalloc by defining xmalloc to bird_xmalloc internally. --- lib/resource.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/resource.h') diff --git a/lib/resource.h b/lib/resource.h index 1a99397..1491fde 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 -- cgit v1.2.3