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 xmalloc(size) _xmalloc_leap(__FILE__, __LINE__, size)
#define xfree(ptr) _xfree_leap(__FILE__, __LINE__, ptr) #define xfree(ptr) _xfree_leap(__FILE__, __LINE__, ptr)
#else #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); void *xmalloc(unsigned);
#define xfree(x) free(x) #define xfree(x) free(x)
#endif #endif