Nagios headers fails to compile in C++

Glenn Herteg gherteg at gwoslabs.com
Wed Dec 15 17:24:47 CET 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



------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d




More information about the Developers mailing list