summaryrefslogtreecommitdiff
path: root/src/main/interactive_shell.cpp
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2011-10-04 15:48:03 +0000
committerMorgan Deters <mdeters@gmail.com>2011-10-04 15:48:03 +0000
commit7961e06fdca05678d27653a0fbe6cec730664a3f (patch)
treee1c63d8bb13111bb94b5f2bffd9f09eb831b32fa /src/main/interactive_shell.cpp
parent536c95e9cd2e98cf3bc01a808ee1ae90df1b1b10 (diff)
add a guard for history saving, to enable building without GNU history library
Diffstat (limited to 'src/main/interactive_shell.cpp')
-rw-r--r--src/main/interactive_shell.cpp2
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() {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback