diff options
author | Martin Mares <mj@ucw.cz> | 2000-03-30 00:57:46 +0200 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2000-03-30 00:57:46 +0200 |
commit | 3ee2310c5dccebe2b63098ab478b5b1d61e4fcb2 (patch) | |
tree | c6ac34de88eb004456cfa1048e951f1b2633b1c7 | |
parent | 2560c8860eeed2e352c394aec920a4f696563e6c (diff) | |
download | bird-3ee2310c5dccebe2b63098ab478b5b1d61e4fcb2.tar bird-3ee2310c5dccebe2b63098ab478b5b1d61e4fcb2.zip |
Avoid conflicts with libraries defining their own xmalloc by defining
xmalloc to bird_xmalloc internally.
-rw-r--r-- | lib/resource.h | 6 |
1 files changed, 6 insertions, 0 deletions
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 |