[Nagios-devel] Nagios headers fails to compile in C++

Glenn Herteg gherteg at gwoslabs.com
Wed Dec 15 16:24:47 UTC 2010


 >> While working on a NEB module written in C++, I found out that out of
 >> the box Nagios headers could not compile properly. This patch correct
 >> this behavior by modifying slightly the API of the commandsmember and
 >> notification structures (but not the ABI).
 >>
 >> What do you think about it ?

 > It can't go in before 3.3 at the earliest. Otherwise I think it's a
 > pretty good idea to either stay away from C++ reserved words entirely
 > or declare plain C as the only valid language for NEB modules.

I don't get it.  Since when are "command" and "contact" reserved words
in C++?

I suspect a conflict not with the C++ language, but with something else
in the OP's compilation environment.

While "command" -> "cmd" is a common substitution in programs, I strongly
dislike the "contact" -> "cntct" transformation.  It's far less readable.
Vowels are in the language for a reason.

Glenn






More information about the Nagios-devel mailing list