mirror of
https://github.com/samba-team/samba.git
synced 2025-03-10 12:58:35 +03:00
r19246: merge from samba4 rev 18207 and 18208:
readline fixes for mac os 10 metze
This commit is contained in:
parent
eb1f0b49cf
commit
976b97ecbf
@ -1183,6 +1183,13 @@ AC_CHECK_LIB(readline, rl_completion_matches,
|
|||||||
[],
|
[],
|
||||||
[$TERMLIBS])
|
[$TERMLIBS])
|
||||||
|
|
||||||
|
# not all readline libs have rl_event_hook or history_list
|
||||||
|
AC_CHECK_DECLS(rl_event_hook, [], [], [#include <readline/readline.h>])
|
||||||
|
AC_CHECK_LIB(readline, history_list,
|
||||||
|
[AC_DEFINE(HAVE_HISTORY_LIST, 1, [Do we have history_list?])],
|
||||||
|
[],
|
||||||
|
[$TERMLIBS])
|
||||||
|
|
||||||
# The following test taken from the cvs sources
|
# The following test taken from the cvs sources
|
||||||
# If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
|
# If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
|
||||||
# The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
|
# The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
|
||||||
|
@ -113,8 +113,10 @@ char *smb_readline(const char *prompt, void (*callback)(void),
|
|||||||
rl_attempted_completion_function = RL_COMPLETION_CAST completion_fn;
|
rl_attempted_completion_function = RL_COMPLETION_CAST completion_fn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if HAVE_DECL_RL_EVENT_HOOK
|
||||||
if (callback)
|
if (callback)
|
||||||
rl_event_hook = (Function *)callback;
|
rl_event_hook = (Function *)callback;
|
||||||
|
#endif
|
||||||
ret = readline(prompt);
|
ret = readline(prompt);
|
||||||
if (ret && *ret)
|
if (ret && *ret)
|
||||||
add_history(ret);
|
add_history(ret);
|
||||||
@ -154,7 +156,7 @@ history
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
int cmd_history(void)
|
int cmd_history(void)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_LIBREADLINE)
|
#if defined(HAVE_LIBREADLINE) && defined(HAVE_HISTORY_LIST)
|
||||||
HIST_ENTRY **hlist;
|
HIST_ENTRY **hlist;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user