From: Morgan Deters Date: Tue, 4 Oct 2011 15:48:03 +0000 (+0000) Subject: add a guard for history saving, to enable building without GNU history library X-Git-Tag: cvc5-1.0.0~8429 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7961e06fdca05678d27653a0fbe6cec730664a3f;p=cvc5.git add a guard for history saving, to enable building without GNU history library --- diff --git a/src/main/interactive_shell.cpp b/src/main/interactive_shell.cpp index 1d1f447be..ef576839c 100644 --- a/src/main/interactive_shell.cpp +++ b/src/main/interactive_shell.cpp @@ -134,6 +134,7 @@ InteractiveShell::InteractiveShell(ExprManager& exprManager, }/* InteractiveShell::InteractiveShell() */ InteractiveShell::~InteractiveShell() { +#if HAVE_LIBREADLINE int err = ::write_history(d_historyFilename.c_str()); if(err == 0) { Notice() << "Wrote " << ::history_length << " lines of history to " @@ -142,6 +143,7 @@ InteractiveShell::~InteractiveShell() { Notice() << "Could not write history to " << d_historyFilename << ": " << strerror(err) << std::endl; } +#endif /* HAVE_LIBREADLINE */ } Command* InteractiveShell::readCommand() {