From 8559ee2918d16db9fceef84eb9e15cc1ab61eb75 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 26 Feb 2010 14:11:33 +0000 Subject: Detect whether rl_completion_matches or completion_matches is declared by readline headers at configure time, and use the appropriate one in bbackupquery. Thanks to Melissa Jenkins for reporting the compilation failure on OSX and providing additional details. --- bin/bbackupquery/bbackupquery.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/bbackupquery/bbackupquery.cpp b/bin/bbackupquery/bbackupquery.cpp index 6d697087..f004310c 100644 --- a/bin/bbackupquery/bbackupquery.cpp +++ b/bin/bbackupquery/bbackupquery.cpp @@ -132,7 +132,12 @@ char ** bbackupquery_completion(const char *text, int start, int end) */ if (start == 0) { - matches = rl_completion_matches(text, command_generator); + #ifdef HAVE_RL_COMPLETION_MATCHES + matches = rl_completion_matches(text, + command_generator); + #elif defined HAVE_COMPLETION_MATCHES + matches = completion_matches(text, command_generator); + #endif } return matches; -- cgit v1.2.3