diff options
author | Chris Wilson <chris+github@qwirx.com> | 2010-02-26 14:11:33 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2010-02-26 14:11:33 +0000 |
commit | 8559ee2918d16db9fceef84eb9e15cc1ab61eb75 (patch) | |
tree | bb7227ccfb843a331752d4711939d067caca8c06 /bin/bbackupquery | |
parent | a4c9b9697bad7e709319e8b8200da6ff3eedfdb3 (diff) |
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.
Diffstat (limited to 'bin/bbackupquery')
-rw-r--r-- | bin/bbackupquery/bbackupquery.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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; |