diff options
author | Morgan Deters <mdeters@gmail.com> | 2011-10-04 15:48:03 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2011-10-04 15:48:03 +0000 |
commit | 7961e06fdca05678d27653a0fbe6cec730664a3f (patch) | |
tree | e1c63d8bb13111bb94b5f2bffd9f09eb831b32fa /src | |
parent | 536c95e9cd2e98cf3bc01a808ee1ae90df1b1b10 (diff) |
add a guard for history saving, to enable building without GNU history library
Diffstat (limited to 'src')
-rw-r--r-- | src/main/interactive_shell.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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() { |