From b86c85f85bbba6e45dc030af3e853edf8b9cfa3d Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Fri, 12 Feb 2021 10:05:53 +0100 Subject: [PATCH] Safeguard against usage of --with-readline or --with-editline Some package maintainers have erroneously used the above ./configure flags during compiling libngspice-0.so. This has led to an unresolved symbol history_file with ngspice-34. --- src/frontend/misccoms.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/frontend/misccoms.c b/src/frontend/misccoms.c index 0afda2c0d3..a8ef938e41 100644 --- a/src/frontend/misccoms.c +++ b/src/frontend/misccoms.c @@ -23,6 +23,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group #include "variable.h" #include "com_unset.h" +#ifndef SHARED_MODULE #ifdef HAVE_GNUREADLINE #include #include @@ -33,6 +34,7 @@ extern char history_file[]; #include extern char history_file[]; #endif +#endif #ifdef SHARED_MODULE extern void rem_controls(void); @@ -291,12 +293,14 @@ static void byemesg(void) { +#ifndef SHARED_MODULE #if defined(HAVE_GNUREADLINE) || defined(HAVE_BSDEDITLINE) /* write out command history only when saying goodbye. */ if (cp_interactive && (cp_maxhistlength > 0)) { stifle_history(cp_maxhistlength); write_history(history_file); } +#endif #endif printf("%s-%s done\n", ft_sim->simulator, ft_sim->version);