Branch: Tag:

1999-10-30

1999-10-30 06:31:02 by Martin Stjernholm <mast@lysator.liu.se>

Avoid macro redefinition warnings when using DEBUG_MALLOC on glibc 2.1
systems.

Rev: src/dmalloc.h:1.18

1:   /* -  * $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: Inside #if defined(DEBUG_MALLOC)
  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__)