diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-11-24 09:05:17 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-24 10:37:03 -0500 |
commit | 727dad10c17cbaade3cb6a56bd4863a4630f4d13 (patch) | |
tree | 3961f31b7c1a0b54b3c972b61937eb0a7ab2db0e /tools/perf/util/util.h | |
parent | 364794845cbc49e638b83d7ef739524291e1e961 (diff) |
perf tools: Remove unused wrapper routines
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 <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1259071517-3242-4-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/util.h')
-rw-r--r-- | tools/perf/util/util.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index 30c5517f2f91..c673d8825883 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) | |||
290 | * Wrappers: | 290 | * Wrappers: |
291 | */ | 291 | */ |
292 | extern char *xstrdup(const char *str); | 292 | extern char *xstrdup(const char *str); |
293 | extern void *xmalloc(size_t size); | 293 | extern void *xmalloc(size_t size) __attribute__((weak)); |
294 | extern void *xmemdupz(const void *data, size_t len); | 294 | extern void *xmemdupz(const void *data, size_t len); |
295 | extern char *xstrndup(const char *str, size_t len); | 295 | extern char *xstrndup(const char *str, size_t len); |
296 | extern void *xrealloc(void *ptr, size_t size); | 296 | extern void *xrealloc(void *ptr, size_t size) __attribute__((weak)); |
297 | extern void *xcalloc(size_t nmemb, size_t size); | ||
298 | extern void *xmmap(void *start, size_t length, int prot, int flags, int fd, off_t offset); | ||
299 | extern ssize_t xread(int fd, void *buf, size_t len); | ||
300 | extern ssize_t xwrite(int fd, const void *buf, size_t len); | ||
301 | extern int xdup(int fd); | ||
302 | extern FILE *xfdopen(int fd, const char *mode); | ||
303 | extern int xmkstemp(char *template); | ||
304 | 297 | ||
305 | static inline void *zalloc(size_t size) | 298 | static inline void *zalloc(size_t size) |
306 | { | 299 | { |