[icinga-checkins] icinga.org: icinga-core/mfriedrich/core: macros: protect against typos in names, add NOTIFICATIONISESCALATED to list of macro names (Andreas Ercisson, Marc Powell)

git at icinga.org git at icinga.org
Wed May 12 20:27:25 CEST 2010


Module: icinga-core
Branch: mfriedrich/core
Commit: d60c8afdbfbec89245fd9eb8459ebaea72d92dbe
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=d60c8afdbfbec89245fd9eb8459ebaea72d92dbe

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Wed May 12 20:26:36 2010 +0200

macros: protect against typos in names, add NOTIFICATIONISESCALATED to list of macro names (Andreas Ercisson, Marc Powell)

This is a merged commit of #402, #403, #407

[--snip--]
macros: Protect against typos in macro names

We achieve this by the simple expedient of replacing the
super-simple function add_macrox_name() with a macro that
expands to the preprocessor macro of the name as the index
and the string we type as the string name of the macro.
[--snip--]

[--snip--]
macros: Add NOTIFICATIONISESCALATED to the list of macro names

It was previously omitted, causing it to never be expanded.
[--snip--]

[--snip--]
common/macros.c: Add missing hash-sign in preprocessor macro

Without this the preprocessor will go looking for macros that
don't exist instead of treating the preprocessor token as a
string, which is what we intended.

Now building works as intended again.
[--snip--]

Also added a short explaination how the strings
are used in the #defined macro.

fixes #402
fixes #403
fixes #407

---

 Changelog        |    2 +
 common/macros.c  |  323 +++++++++++++++++++++++++++---------------------------
 include/macros.h |    1 -
 3 files changed, 161 insertions(+), 165 deletions(-)

Diff:   https://git.icinga.org/?p=icinga-core.git;a=commitdiff;h=d60c8afdbfbec89245fd9eb8459ebaea72d92dbe




More information about the icinga-checkins mailing list