[Spice-devel] [PATCH 1/2] server/red_worker.h: order includes correcty

Christophe Fergeau cfergeau at redhat.com
Mon Sep 2 00:35:16 PDT 2013


On Sun, Sep 01, 2013 at 03:24:32AM -0400, Alon Levy wrote:
> > Do we document anywhere what is a 'correct' order? I assume it's config.h,
> > alphabetically ordered system headers (with subdirs coming last), and
> > finally local headers?
> > I assume this is pretty standard practice, but I always have to think to
> > remember exactly how to order things :)
> 
> There is a coding standard, in pdf form, it should have this reference.

Ah right, I had totally forgotten about that doc, I was looking for it
along with spice sources ;) It does not seem to talk about header orders
though.

> The 'correct' order, as I (and Hans too it seems) see it is:
> system includes
> external libraries includes
> internal not same file name includes
> file (i.e. s/filename.c/filename.h/) include, if any

Works for me (any order would I guess ;) I was just wondering where this
'correct' order was defined for future reference.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20130902/2b58ffe7/attachment.pgp>


More information about the Spice-devel mailing list