On Thu, 28 May 2015 15:53:38 +0100 (BST)
Paul Jakma <[email protected]> wrote:

> On Fri, 22 May 2015, Donald Sharp wrote:
> 
> > I would buy the faster build time if the header wasn't actually
> > needed.  To take the argument to it's logical conclusion just
> > define everything you need right in the c code instead of using
> > headers if we are after faster compile time.
> >
> > If there are namespace collisions from stream.h and other system
> > headers they should be solved via configure.ac changes.  Or further
> > refactoring of headers..  If I need a struct from prefix.h I say we
> > should include it.
> 
> Yeah, I'd agree.

It's not possible in some cases. linux-kernel headers being notable
example of this.

And really only "struct prefix *" is needed, so a "struct prefix;" is
the better way to do it.

As  alternative, I would then move encoding/decoding of all the
complicated structures to where is defined. That is stream_put_prefix()
should go in prefix.h (perhaps renamed to prefix_something). The
problem is that it's not practical to assume that stream.h depends on
all data types we want to encode/decode.

But as I'm now using zbuf internally in my code. So I don't "have to"
have this.

/Timo

_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to