@@ -57,6 +57,10 @@ extern void *
5757NCI_Malloc_fn (size_t size , const int lineno , const char * func ,
5858 const char * filename );
5959
60+ extern void *
61+ NCI_Strdup_fn (const char * src , const int lineno , const char * func ,
62+ const char * filename );
63+
6064extern void *
6165NCI_Calloc_fn (size_t nelem , size_t elsize , const int lineno , const char * func ,
6266 const char * filename );
@@ -71,11 +75,13 @@ NCI_Free_fn(void *ptr, const int lineno, const char *func,
7175
7276#if defined(PNETCDF_DEBUG ) || defined(PNC_MALLOC_TRACE )
7377#define NCI_Malloc (a ) NCI_Malloc_fn(a,__LINE__,__func__,__FILE__)
78+ #define NCI_Strdup (a ) NCI_Strdup_fn(a,__LINE__,__func__,__FILE__)
7479#define NCI_Calloc (a ,b ) NCI_Calloc_fn(a,b,__LINE__,__func__,__FILE__)
7580#define NCI_Realloc (a ,b ) NCI_Realloc_fn(a,b,__LINE__,__func__,__FILE__)
7681#define NCI_Free (a ) NCI_Free_fn(a,__LINE__,__func__,__FILE__)
7782#else
7883#define NCI_Malloc (a ) malloc(a)
84+ #define NCI_Strdup (a ) strdup(a)
7985#define NCI_Calloc (a ,b ) calloc(a,b)
8086#define NCI_Realloc (a ,b ) realloc(a,b)
8187#define NCI_Free (a ) free(a)
0 commit comments