On 12/15/2010 12:13 PM, Matthieu Kermagoret wrote:
> Hi list,
>
> 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.
An acceptable patch right now would be to surround the offending
variable names with
#ifndef __cplusplus
/* original implementation */
#else
/* c++ style names */
#endif
although I realize that such a change would be a lot more cumbersome.
It would however attract more attention so we stay away from C++
reserved words when redesigning the object structure, assuming we
actually remember which ones they are. Although I suppose that can
be quite easily tested by attempting to compile Nagios with g++
instead of gcc.
--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]