summaryrefslogtreecommitdiffstats
path: root/source/lib/readline.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-10-11 13:59:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:15:25 -0500
commit976b97ecbf9bde400a6f92cad9d9709d56e73058 (patch)
treeff47eee1419e6b07d0c92aa1c677a1672bcf6c4e /source/lib/readline.c
parenteb1f0b49cf0e84385a62f9dfcb2167fea2e8fd8b (diff)
downloadsamba-976b97ecbf9bde400a6f92cad9d9709d56e73058.tar.gz
samba-976b97ecbf9bde400a6f92cad9d9709d56e73058.tar.xz
samba-976b97ecbf9bde400a6f92cad9d9709d56e73058.zip
r19246: merge from samba4 rev 18207 and 18208:
readline fixes for mac os 10 metze
Diffstat (limited to 'source/lib/readline.c')
-rw-r--r--source/lib/readline.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/lib/readline.c b/source/lib/readline.c
index 1f599dc0a7f..24d16ea34fb 100644
--- a/source/lib/readline.c
+++ b/source/lib/readline.c
@@ -113,8 +113,10 @@ char *smb_readline(const char *prompt, void (*callback)(void),
rl_attempted_completion_function = RL_COMPLETION_CAST completion_fn;
}
+#if HAVE_DECL_RL_EVENT_HOOK
if (callback)
rl_event_hook = (Function *)callback;
+#endif
ret = readline(prompt);
if (ret && *ret)
add_history(ret);
@@ -154,7 +156,7 @@ history
****************************************************************************/
int cmd_history(void)
{
-#if defined(HAVE_LIBREADLINE)
+#if defined(HAVE_LIBREADLINE) && defined(HAVE_HISTORY_LIST)
HIST_ENTRY **hlist;
int i;