From 2e6653d0f8fdf18517df11421ffe426312d6941a Mon Sep 17 00:00:00 2001 From: Martin Stjernholm <mast@lysator.liu.se> Date: Sat, 30 Oct 1999 08:31:02 +0200 Subject: [PATCH] Avoid macro redefinition warnings when using DEBUG_MALLOC on glibc 2.1 systems. Rev: src/dmalloc.h:1.18 --- src/dmalloc.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/dmalloc.h b/src/dmalloc.h index 22016d364b..de42a6518d 100644 --- a/src/dmalloc.h +++ b/src/dmalloc.h @@ -1,5 +1,5 @@ /* - * $Id: dmalloc.h,v 1.17 1999/10/21 22:40:23 grubba Exp $ + * $Id: dmalloc.h,v 1.18 1999/10/30 06:31:02 mast Exp $ */ extern char *debug_xalloc(long); @@ -33,6 +33,11 @@ void *debug_malloc_update_location(void *,const char *, int); void *debug_malloc_name(void *p,const char *fn, int line); void debug_malloc_copy_names(void *p, void *p2); +/* glibc 2.1 defines this as a macro. */ +#ifdef strdup +#undef strdup +#endif + #define malloc(x) debug_malloc((x), __FILE__, __LINE__) #define calloc(x, y) debug_calloc((x), (y), __FILE__, __LINE__) #define realloc(x, y) debug_realloc((x), (y), __FILE__, __LINE__) -- GitLab