From: Russell Bryant Date: Sat, 4 Sep 2010 18:10:46 +0000 (+0000) Subject: Merged revisions 285057 via svnmerge from X-Git-Tag: 11.0.0-beta1~2373 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8a49683ead518a14e8de9b9d0c9ef3479add9cd;p=thirdparty%2Fasterisk.git Merged revisions 285057 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r285057 | russell | 2010-09-04 13:08:19 -0500 (Sat, 04 Sep 2010) | 2 lines Add a C++ compatible version of AST_CLI_DEFINE(). ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@285058 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/include/asterisk/cli.h b/include/asterisk/cli.h index 7258548b6f..21a03834de 100644 --- a/include/asterisk/cli.h +++ b/include/asterisk/cli.h @@ -183,9 +183,13 @@ struct ast_cli_entry { AST_LIST_ENTRY(ast_cli_entry) list; }; +#if defined(__cplusplus) || defined(c_plusplus) +#define AST_CLI_DEFINE(fn, txt) { { "" }, txt, NULL, 0, NULL, NULL, 0, 0, NULL, fn } +#else /* XXX the parser in gcc 2.95 gets confused if you don't put a space * between the last arg before VA_ARGS and the comma */ #define AST_CLI_DEFINE(fn, txt , ... ) { .handler = fn, .summary = txt, ## __VA_ARGS__ } +#endif /*! * Helper function to generate cli entries from a NULL-terminated array.