svn commit: samba r19246 - in branches/SAMBA_3_0/source: . lib
metze at samba.org
metze at samba.org
Wed Oct 11 13:59:03 GMT 2006
Author: metze
Date: 2006-10-11 13:59:03 +0000 (Wed, 11 Oct 2006)
New Revision: 19246
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19246
Log:
merge from samba4 rev 18207 and 18208:
readline fixes for mac os 10
metze
Modified:
branches/SAMBA_3_0/source/configure.in
branches/SAMBA_3_0/source/lib/readline.c
Changeset:
Modified: branches/SAMBA_3_0/source/configure.in
===================================================================
--- branches/SAMBA_3_0/source/configure.in 2006-10-11 13:36:37 UTC (rev 19245)
+++ branches/SAMBA_3_0/source/configure.in 2006-10-11 13:59:03 UTC (rev 19246)
@@ -1183,6 +1183,13 @@
[],
[$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
# 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
Modified: branches/SAMBA_3_0/source/lib/readline.c
===================================================================
--- branches/SAMBA_3_0/source/lib/readline.c 2006-10-11 13:36:37 UTC (rev 19245)
+++ branches/SAMBA_3_0/source/lib/readline.c 2006-10-11 13:59:03 UTC (rev 19246)
@@ -113,8 +113,10 @@
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 @@
****************************************************************************/
int cmd_history(void)
{
-#if defined(HAVE_LIBREADLINE)
+#if defined(HAVE_LIBREADLINE) && defined(HAVE_HISTORY_LIST)
HIST_ENTRY **hlist;
int i;
More information about the samba-cvs
mailing list