|
From: Masatake Y. <ya...@re...> - 2017-12-18 04:25:06
|
I'm planning to link strace with libiberty for mangling C++ symbol appearted in stack trace enabled with -k option. Both the names, xmalloc and xcalloc, are already used in the library. They are conflicts the functions having the same names in strace. Newly introduced macors(strace_calloc and strace_malloc) rename the names defined in strace side for avoiding the confliction. * xmalloc.h (strace_calloc, strace_malloc): New macros. Signed-off-by: Masatake YAMATO <ya...@re...> --- xmalloc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xmalloc.h b/xmalloc.h index d1feeb91..89234e20 100644 --- a/xmalloc.h +++ b/xmalloc.h @@ -36,6 +36,8 @@ #include <stddef.h> #include "gcc_compat.h" +#define xcalloc strace_calloc +#define xmalloc strace_malloc void *xcalloc(size_t nmemb, size_t size) ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE((1, 2)); void *xmalloc(size_t size) ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE((1)); -- 2.14.3 |