[quagga-dev 5252] Re: [PATCH] include quagga headers in C++

Peter Szilagyi sp615 at hszk.bme.hu
Sun Feb 3 19:10:03 GMT 2008

On Feb 3, 2008 7:27 PM,  <paul at clubi.ie> wrote:
> It's a shame the C++ 'extern "C"' thing doesn't apply to keywords.
> There's no easy way for non-C++ people, when extending Quagga, to
> know whether they've affected useability of headers, is there?

A full-proof method would be to create a test.cpp file like this:

#include <quagga/*.h> /* include all quagga headers here */
int main(int argc, char ** argv) { return 0; }

and compile it with `g++ -c -o /dev/null test.cpp'. If you get no
errors, all included headers are C++-aware. Otherwise you would get a
load of syntax errors.

> What are you trying to get from the ospfd.h and ospf6_area.h headers
> btw? Perhaps the answer there is to seperate out protocol definitions
> from implementation details...

I don't really need anything from these particular headers. They only
had to be changed for the sake of C++.
Although separating implementation from interface definition is
usually a good practice.


More information about the Quagga-dev mailing list