[quagga-dev 12442] Re: [PATCH 04/10] lib: make stream.h lighter to include

Donald Sharp sharpd at cumulusnetworks.com
Fri May 22 16:18:18 BST 2015

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.


On Fri, May 22, 2015 at 8:07 AM, Timo Teras <timo.teras at iki.fi> wrote:

> On Fri, 22 May 2015 07:44:43 -0700
> Donald Sharp <sharpd at cumulusnetworks.com> wrote:
> > Why are we removing the #include "prefix.h" in stream.h?  I'm not
> > sure what we gain here.
> Faster build time. And less dependencies. And I in fact had namespace
> collisions when trying to use stream.h together with certain system
> headers (musl c-library and linux kernel headers conflicts arose).
> I wound writing zbuf, and not using stream.h. So this is not strictly
> necessary. But in general, making the headers not include each other is
> usually good on long term. Otherwise you make easily headers depend on
> each other recursively.
> >
> > donald
> >
> > On Fri, May 22, 2015 at 3:40 AM, Timo Teräs <timo.teras at iki.fi> wrote:
> >
> > > Fix other places that assumed stream.h pulls in prefix.h.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quagga.net/pipermail/quagga-dev/attachments/20150522/d17357cc/attachment-0001.html>

More information about the Quagga-dev mailing list