X-Git-Url: https://git.saurik.com/apple/ipsec.git/blobdiff_plain/52b7d2ce06d68d0a9160d16f6e7c08c21c149d0d..e627a751fc4d26304657fc20440abb72632b1e6e:/ipsec-tools/racoon/gcmalloc.h diff --git a/ipsec-tools/racoon/gcmalloc.h b/ipsec-tools/racoon/gcmalloc.h index ca08528..c759fde 100644 --- a/ipsec-tools/racoon/gcmalloc.h +++ b/ipsec-tools/racoon/gcmalloc.h @@ -1,3 +1,5 @@ +/* $NetBSD: gcmalloc.h,v 1.4 2006/09/09 16:22:09 manu Exp $ */ + /* $KAME: gcmalloc.h,v 1.4 2001/11/16 04:34:57 sakane Exp $ */ /* @@ -77,26 +79,24 @@ free(void *ptr) GC_FREE(ptr); } + +char * +strdup(const char *str) +{ + + return (GC_STRDUP(str)); +} #endif /* RACOON_MAIN_PROGRAM */ #define racoon_malloc(sz) GC_debug_malloc(sz, GC_EXTRAS) #define racoon_calloc(cnt, sz) GC_debug_malloc(cnt * sz, GC_EXTRAS) #define racoon_realloc(old, sz) GC_debug_realloc(old, sz, GC_EXTRAS) #define racoon_free(p) GC_debug_free(p) +#define racoon_strdup(str) GC_debug_strdup(str) #endif /* GC */ -/* - * Dmalloc only requires that you pull in a header file and link - * against libdmalloc. - */ -#ifdef DMALLOC -#include -#endif /* DMALLOC */ -#ifdef DEBUG_RECORD_MALLOCATION -#include -#else #ifndef racoon_malloc #define racoon_malloc(sz) malloc((sz)) #endif @@ -109,6 +109,8 @@ free(void *ptr) #ifndef racoon_free #define racoon_free(p) free((p)) #endif -#endif /* DEBUG_RECORD_MALLOCATION */ +#ifndef racoon_strdup +#define racoon_strdup(s) strdup((s)) +#endif #endif /* _GCMALLOC_H_DEFINED */