0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-09 12:48:43 +00:00

Avoid conflicts with libraries defining their own xmalloc by defining

xmalloc to bird_xmalloc internally.
This commit is contained in:
Martin Mares 2000-03-29 22:57:46 +00:00
parent 2560c8860e
commit 3ee2310c5d

View File

@ -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