Re: [PATCH 1/2] unify header include order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 11, 2016 at 12:25:00PM -0400, Frediano Ziglio wrote:
> > 
> > On Tue, May 10, 2016 at 02:23:04PM +0100, Frediano Ziglio wrote:
> > > Use this style for include headers inside headers:
> > > 
> > >   #include <system_headers.h>
> > >   #include <no_spice_no_system_libraries.h>
> > >   #include <spice_protocol.h>
> > >   #include <spice_common.h>
> > > 
> > >   #include "spice_server.h"
> > 
> > I would add that to this coding style document if it's not already
> > there. I tend to prefer when the headers are alphabetically ordered
> > within a given section (probably not worth changing throughout the
> > codebase now, but could be nice to keep an eye on that when adding new
> > #includes)
> > 
> 
> I think the alphabetical order is a bit too strict.
> Also for experience some - even system - headers needs to
> be included before some others just to avoid bugs (first I
> remember is windows.h and winsock2.h but even HP-UX and
> others systems, I remember one nasty problem with a stdarg.h).

I'm not suggesting a strict enforcement of this, but when adding new
#includes, I think it would be nicer to try to get some kind of order ;)

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]