diff --git a/src/include/ngspice/ngspice.h b/src/include/ngspice/ngspice.h index e4f1b3167..3e9465614 100644 --- a/src/include/ngspice/ngspice.h +++ b/src/include/ngspice/ngspice.h @@ -283,9 +283,11 @@ extern int tcl_fprintf(FILE *f, const char *format, ...); #elif defined SHARED_MODULE #include +#include extern int sh_printf(const char *format, ...); extern int sh_fprintf(FILE *fd, const char *format, ...); +extern int sh_vfprintf(FILE *fd, const char *format, va_list args); extern int sh_fputs(const char *input, FILE *fd); extern int sh_fputc(int input, FILE *fd); extern int sh_putc(int input, FILE *fd); @@ -293,6 +295,9 @@ extern void SetAnalyse(char *analyse, int percent); #define HAS_PROGREP +#undef vfprintf +#define vfprintf sh_vfprintf + #undef printf #define printf sh_printf diff --git a/src/sharedspice.c b/src/sharedspice.c index c8dbae071..2f4acd42b 100644 --- a/src/sharedspice.c +++ b/src/sharedspice.c @@ -898,6 +898,12 @@ add_bkpt(void) } +/* use the original vprintf() in the rest of this file + * instead of the redirected variant + */ +#undef vfprintf + + /*------------------------------------------------------*/ /* Redefine the vfprintf() functions for callback */ /*------------------------------------------------------*/