summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorunknown <stewart@willster.(none)>2007-06-14 11:59:25 +1000
committerunknown <stewart@willster.(none)>2007-06-14 11:59:25 +1000
commitcb9817cc239ac7a42f4a12ef72379bdf0d18a934 (patch)
treec84fed2b2eead75236a6a72da4631d3f8d7a4efc /storage
parent29987e6e29990e24a90237bf360e9c1097f2a1e9 (diff)
downloadmariadb-git-cb9817cc239ac7a42f4a12ef72379bdf0d18a934.tar.gz
fix build of mgm client with history - caught by pb.
storage/ndb/src/mgmclient/main.cpp: fix build issues only caught by pb (mgm client history related)
Diffstat (limited to 'storage')
-rw-r--r--storage/ndb/src/mgmclient/main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/storage/ndb/src/mgmclient/main.cpp b/storage/ndb/src/mgmclient/main.cpp
index 429ccb27b2e..7513064d273 100644
--- a/storage/ndb/src/mgmclient/main.cpp
+++ b/storage/ndb/src/mgmclient/main.cpp
@@ -23,6 +23,8 @@ extern "C" {
#elif !defined(__NETWARE__)
#include <readline/readline.h>
extern "C" int add_history(const char *command); /* From readline directory */
+extern "C" int read_history(const char *command);
+extern "C" int write_history(const char *command);
#define HAVE_READLINE
#endif
}
@@ -158,6 +160,7 @@ int main(int argc, char** argv){
BaseString histfile;
if (!opt_execute_str)
{
+#ifdef HAVE_READLINE
char *histfile_env= getenv("NDB_MGM_HISTFILE");
if (histfile_env)
histfile.assign(histfile_env,strlen(histfile_env));
@@ -168,10 +171,12 @@ int main(int argc, char** argv){
}
if (histfile.length())
read_history(histfile.c_str());
+#endif
ndbout << "-- NDB Cluster -- Management Client --" << endl;
while(read_and_execute(_try_reconnect));
+#ifdef HAVE_READLINE
if (histfile.length())
{
BaseString histfile_tmp;
@@ -180,6 +185,7 @@ int main(int argc, char** argv){
if(!write_history(histfile_tmp.c_str()))
my_rename(histfile_tmp.c_str(), histfile.c_str(), MYF(MY_WME));
}
+#endif
}
else
{