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.
This commit is contained in:
parent
8076e2b4cf
commit
b86c85f85b
|
|
@ -23,6 +23,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
|
||||||
#include "variable.h"
|
#include "variable.h"
|
||||||
#include "com_unset.h"
|
#include "com_unset.h"
|
||||||
|
|
||||||
|
#ifndef SHARED_MODULE
|
||||||
#ifdef HAVE_GNUREADLINE
|
#ifdef HAVE_GNUREADLINE
|
||||||
#include <readline/readline.h>
|
#include <readline/readline.h>
|
||||||
#include <readline/history.h>
|
#include <readline/history.h>
|
||||||
|
|
@ -33,6 +34,7 @@ extern char history_file[];
|
||||||
#include <editline/readline.h>
|
#include <editline/readline.h>
|
||||||
extern char history_file[];
|
extern char history_file[];
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef SHARED_MODULE
|
#ifdef SHARED_MODULE
|
||||||
extern void rem_controls(void);
|
extern void rem_controls(void);
|
||||||
|
|
@ -291,12 +293,14 @@ static void
|
||||||
byemesg(void)
|
byemesg(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#ifndef SHARED_MODULE
|
||||||
#if defined(HAVE_GNUREADLINE) || defined(HAVE_BSDEDITLINE)
|
#if defined(HAVE_GNUREADLINE) || defined(HAVE_BSDEDITLINE)
|
||||||
/* write out command history only when saying goodbye. */
|
/* write out command history only when saying goodbye. */
|
||||||
if (cp_interactive && (cp_maxhistlength > 0)) {
|
if (cp_interactive && (cp_maxhistlength > 0)) {
|
||||||
stifle_history(cp_maxhistlength);
|
stifle_history(cp_maxhistlength);
|
||||||
write_history(history_file);
|
write_history(history_file);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
printf("%s-%s done\n", ft_sim->simulator, ft_sim->version);
|
printf("%s-%s done\n", ft_sim->simulator, ft_sim->version);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue