From: Martin Mares Date: Wed, 29 Mar 2000 22:57:46 +0000 (+0000) Subject: Avoid conflicts with libraries defining their own xmalloc by defining X-Git-Tag: v1.2.0~1244 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ee2310c5dccebe2b63098ab478b5b1d61e4fcb2;p=thirdparty%2Fbird.git Avoid conflicts with libraries defining their own xmalloc by defining xmalloc to bird_xmalloc internally. --- diff --git a/lib/resource.h b/lib/resource.h index 1a9939780..1491fde7c 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