From 22a9b8f427d724088a9468c56c756f210e7522c7 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 26 Mar 2011 23:25:17 +0000 Subject: Eliminate nested macros to fix compile with MSVC 2010. --- bin/bbackupquery/CommandCompletion.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bin/bbackupquery/CommandCompletion.cpp') diff --git a/bin/bbackupquery/CommandCompletion.cpp b/bin/bbackupquery/CommandCompletion.cpp index b69c7427..f7dab973 100644 --- a/bin/bbackupquery/CommandCompletion.cpp +++ b/bin/bbackupquery/CommandCompletion.cpp @@ -81,14 +81,16 @@ COMPLETION_FUNCTION(None,) #define HAVE_A_FILENAME_COMPLETION_FUNCTION 1 #endif -COMPLETION_FUNCTION(Default, #ifdef HAVE_A_FILENAME_COMPLETION_FUNCTION +COMPLETION_FUNCTION(Default, while (const char *match = RL_FILENAME_COMPLETION_FUNCTION(prefix.c_str(), 0)) { completions.push_back(match); } -#endif // HAVE_A_FILENAME_COMPLETION_FUNCTION ) +#else // !HAVE_A_FILENAME_COMPLETION_FUNCTION +COMPLETION_FUNCTION(Default,) +#endif // HAVE_A_FILENAME_COMPLETION_FUNCTION COMPLETION_FUNCTION(Command, int len = prefix.length(); -- cgit v1.2.3