svn commit: samba r18207 - in branches/SAMBA_4_0/source/lib/smbreadline: .

tridge at samba.org tridge at samba.org
Thu Sep 7 07:56:41 GMT 2006


Author: tridge
Date: 2006-09-07 07:56:41 +0000 (Thu, 07 Sep 2006)
New Revision: 18207

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18207

Log:

not all readline libs have rl_event_hook

this should help with coreserverbuild (Mac OS X)

Modified:
   branches/SAMBA_4_0/source/lib/smbreadline/readline.m4
   branches/SAMBA_4_0/source/lib/smbreadline/smbreadline.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/smbreadline/readline.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/smbreadline/readline.m4	2006-09-07 07:26:02 UTC (rev 18206)
+++ branches/SAMBA_4_0/source/lib/smbreadline/readline.m4	2006-09-07 07:56:41 UTC (rev 18207)
@@ -68,6 +68,9 @@
 	     [],
 	     [$TERMLIBS])
 
+# not all readline libs have rl_event_hook
+AC_CHECK_DECLS(rl_event_hook, [], [], [#include <readline/readline.h>])
+
 AC_MSG_CHECKING(whether to use extern readline)
 if test x"$EXTERNAL_READLINE" = x"yes"; then
 	AC_MSG_RESULT(yes)

Modified: branches/SAMBA_4_0/source/lib/smbreadline/smbreadline.c
===================================================================
--- branches/SAMBA_4_0/source/lib/smbreadline/smbreadline.c	2006-09-07 07:26:02 UTC (rev 18206)
+++ branches/SAMBA_4_0/source/lib/smbreadline/smbreadline.c	2006-09-07 07:56:41 UTC (rev 18207)
@@ -127,8 +127,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);



More information about the samba-cvs mailing list