summaryrefslogtreecommitdiffstats
path: root/lib/replace/system/readline.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/replace/system/readline.h')
-rw-r--r--lib/replace/system/readline.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/replace/system/readline.h b/lib/replace/system/readline.h
index ba34dc6a612..e6b8fb9129b 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