[lxc-devel] [PATCH] [cosmetic] adjust include statements (v2)

Serge Hallyn serge.hallyn at ubuntu.com
Thu Jan 2 05:54:09 UTC 2014


Quoting Stéphane Graber (stgraber at ubuntu.com):
> On Wed, Jan 01, 2014 at 02:30:21PM -0600, Serge Hallyn wrote:
> > Quoting S.Çağlar Onur (caglar at 10ur.org):
> > > Hey Serge,
> > > 
> > > On Wed, Jan 1, 2014 at 3:04 PM, Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
> > > > Quoting S.Çağlar Onur (caglar at 10ur.org):
> > > >> Use "#include <somefile.h>" style for external or exported headers only.
> > > >>
> > > >> changes since v1:
> > > >>  - adjusted formatting as Stéphane suggested
> > > >>
> > > >> Signed-off-by: S.Çağlar Onur <caglar at 10ur.org>
> > > >
> > > > I'm not sure why you made an exception for <lxc/lxccontainer.h>,
> > > > but no big deal.
> > > 
> > > That was Stéphane's suggestion (assuming I didn't misunderstand),
> > > 
> > > http://lists.linuxcontainers.org/pipermail/lxc-devel/2013-December/006705.html
> > 
> > I don't get it.  Stéphane, why do you want lxccontainers.h in
> > lxc_autostart.c in the above link to come from <lxc/lxccontainers.h>
> > instead of "lxccontainers.h"?  In your argument further up I thought
> > you meant the #includes *in* those .h files would use <lxc/>, not
> > the includes *of* those .h files.
> 
> I like all the code we have to consistently use:
>  - <something.h> for external system headers
>  - <lxc/something.h> for LXC headers which are public
>  - "something.h" for LXC headers which are private
> 
> This tends to make it much clearer whether any given binary we have in
> the tree may be built outside of the tree with just our public headers
> installed (as shipped in the lxc-dev package).

Oh, I see, makes sense, and is fine so long as Makefile ensures that
our tree's includes preempt site-locals (which it does).

thanks,
-serge


More information about the lxc-devel mailing list