From 7961e06fdca05678d27653a0fbe6cec730664a3f Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Tue, 4 Oct 2011 15:48:03 +0000 Subject: [PATCH] add a guard for history saving, to enable building without GNU history library --- src/main/interactive_shell.cpp | 2 ++ 1 file changed, 2 insertions(+) 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() { -- 2.30.2