From bdb69d7a3ecaa640eb51725365785db128a03206 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sun, 5 Nov 2017 14:20:00 +0100 Subject: [PATCH] replace strdup by copy --- src/include/ngspice/ngspice.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/include/ngspice/ngspice.h b/src/include/ngspice/ngspice.h index 12992f13b..7ec3cf7de 100644 --- a/src/include/ngspice/ngspice.h +++ b/src/include/ngspice/ngspice.h @@ -155,6 +155,10 @@ extern void SetAnalyse(char *Analyse, int Percent); #include /* getpid() */ #endif +/* Use internal copy() function instead of strdup, to +have memory allocation only by functions in alloc.c */ +#define strdup copy + #if defined (_MSC_VER) #include #include @@ -172,7 +176,6 @@ extern double x_acosh(double); extern double x_atanh(double); #define hypot _hypot #endif -#define strdup _strdup #define unlink _unlink #define fileno _fileno #define getcwd _getcwd