more mac fixes
authorMorgan Deters <mdeters@gmail.com>
Tue, 27 Nov 2012 19:18:12 +0000 (19:18 +0000)
committerMorgan Deters <mdeters@gmail.com>
Tue, 27 Nov 2012 19:18:12 +0000 (19:18 +0000)
config/readline.m4
src/main/interactive_shell.cpp

index dcf9a9c1896bd443ca9e91140090c09d3c9cd18c..44be9ff41d4f8856e33e8b5489612169e3b61942 100644 (file)
@@ -62,12 +62,13 @@ else
     AC_MSG_CHECKING([for type of rl_completion_entry_function])
     AC_LANG_PUSH([C++])
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+#include <stdio.h>
 #include <readline/readline.h>
 char* foo(const char*, int) { return (char*)0; }],[
-::rl_completion_entry_function = foo;])],
+rl_completion_entry_function = foo;])],
       [AC_MSG_RESULT([char* (*)(const char*, int)])
        readline_compentry_func_returns_charp=1],
-      [AC_MSG_FAILURE([Function])])
+      [AC_MSG_RESULT([Function])])
     AC_LANG_POP([C++])
   else
     have_libreadline=0
index 7cef623e94dc12c41139d52f26e30778e9d4f3b5..c1d2c2bb12284e964d75d03e18de5f3a8c1a669d 100644 (file)
@@ -98,7 +98,7 @@ InteractiveShell::InteractiveShell(ExprManager& exprManager,
 #if READLINE_COMPENTRY_FUNC_RETURNS_CHARP
     ::rl_completion_entry_function = commandGenerator;
 #else /* READLINE_COMPENTRY_FUNC_RETURNS_CHARP */
-    ::rl_completion_entry_function = (Function) commandGenerator;
+    ::rl_completion_entry_function = (int (*)(const char*, int)) commandGenerator;
 #endif /* READLINE_COMPENTRY_FUNC_RETURNS_CHARP */
     ::using_history();