From 727dad10c17cbaade3cb6a56bd4863a4630f4d13 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Tue, 24 Nov 2009 12:05:17 -0200 Subject: perf tools: Remove unused wrapper routines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And also make xrealloc and xmalloc weak symbols so that we don't have this problem: /usr/lib/gcc/x86_64-redhat-linux/4.4.1/../../../../lib64/libiberty.a(xmalloc.o): In function `xrealloc': (.text+0xc0): multiple definition of `xrealloc' libperf.a(wrapper.o):/home/acme_unencrypted/git/linux-2.6-tip/tools/perf/util/wrapper.c:67: first defined here collect2: ld returned 1 exit status Signed-off-by: Arnaldo Carvalho de Melo Cc: Frédéric Weisbecker Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Paul Mackerras LKML-Reference: <1259071517-3242-4-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar --- tools/perf/util/util.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'tools/perf/util/util.h') diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index 30c5517..c673d88 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h @@ -290,17 +290,10 @@ static inline char *gitstrchrnul(const char *s, int c) * Wrappers: */ extern char *xstrdup(const char *str); -extern void *xmalloc(size_t size); +extern void *xmalloc(size_t size) __attribute__((weak)); extern void *xmemdupz(const void *data, size_t len); extern char *xstrndup(const char *str, size_t len); -extern void *xrealloc(void *ptr, size_t size); -extern void *xcalloc(size_t nmemb, size_t size); -extern void *xmmap(void *start, size_t length, int prot, int flags, int fd, off_t offset); -extern ssize_t xread(int fd, void *buf, size_t len); -extern ssize_t xwrite(int fd, const void *buf, size_t len); -extern int xdup(int fd); -extern FILE *xfdopen(int fd, const char *mode); -extern int xmkstemp(char *template); +extern void *xrealloc(void *ptr, size_t size) __attribute__((weak)); static inline void *zalloc(size_t size) { -- cgit v1.1