Skip to content

Commit

Permalink
Safeguard against usage of --with-readline or --with-editline
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
holvo committed Feb 21, 2021
1 parent 8076e2b commit b86c85f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/frontend/misccoms.c
Expand Up @@ -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 <readline/readline.h>
#include <readline/history.h>
Expand All @@ -33,6 +34,7 @@ extern char history_file[];
#include <editline/readline.h>
extern char history_file[];
#endif
#endif

#ifdef SHARED_MODULE
extern void rem_controls(void);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b86c85f

Please sign in to comment.