From 3eac6335229fabfe3c985d0b206faa5d65ad1ce7 Mon Sep 17 00:00:00 2001 From: James Peach Date: Thu, 18 Mar 2010 19:30:54 -0700 Subject: libreplace: Fix readline build with libedit. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit libedit on MAc OSX 10.5 does not have the rl_completion_t typedef, but uses a internal typedef names CPPFunction. Signed-off-by: Günther Deschner --- lib/replace/system/readline.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/replace/system') diff --git a/lib/replace/system/readline.h b/lib/replace/system/readline.h index ba34dc6a61..e6b8fb9129 100644 --- a/lib/replace/system/readline.h +++ b/lib/replace/system/readline.h @@ -43,7 +43,13 @@ #endif #ifdef HAVE_NEW_LIBREADLINE -# define RL_COMPLETION_CAST (rl_completion_func_t *) +#ifdef HAVE_CPPFUNCTION +# define RL_COMPLETION_CAST (CPPFunction *) +#elif HAVE_RL_COMPLETION_T +# define RL_COMPLETION_CAST (rl_completion_t *) +#else +# define RL_COMPLETION_CAST +#endif #else /* This type is missing from libreadline<4.0 (approximately) */ # define RL_COMPLETION_CAST -- cgit