Hi Emil! On Mon, Jul 20, 2015 at 05:00:43PM +0100, Emil Velikov wrote: > On 19 July 2015 at 08:56, Thomas Klausner <[email protected]> wrote: > > From: Matthew Green <[email protected]> > > > > Move X11/Xpoll.h include earlier than sys/select.h to avoid missing > > out on setting FD_SETSIZE early enough. > > > Shouldn't there be a comment to prevent the next person from > reverting/messing up with the order ? > > ... > > diff --git a/os/io.c b/os/io.c > > index 124ecd8..8ebb8e4 100644 > > --- a/os/io.c > > +++ b/os/io.c > > @@ -46,6 +46,8 @@ in this Software without prior written authorization from > > The Open Group. > > * THIS SOFTWARE. > > */ > > > > +#include "X11/Xpoll.h" > > + > > #include "config.h" > > > This looks like a no-go. I cannot think of a case where you'd want > anything before config.h.
So would you like the attached patch pushed too? > Mildly related: how many cases in Xorg are there, where config.h is > not the first include, is missing (but needed), or the #ifdef guard is > omitted ? I'd assume 1 & 3 shouldn't be too hard to grep through. > Note: I'm neither suggesting that you should do it, nor volunteering > :-) About #3: we avoid config.h in NetBSD's xsrc, so we'll report any we find (see the xmag ones today for example). Thanks for not volunteering me :) Thomas
diff --git a/os/io.c b/os/io.c index 8ebb8e4..8259b2f 100644 --- a/os/io.c +++ b/os/io.c @@ -46,10 +46,11 @@ in this Software without prior written authorization from The Open Group. * THIS SOFTWARE. */ -#include "X11/Xpoll.h" - #include "config.h" +/* include Xpoll.h early for possible FD_SETSIZE re-definition */ +#include "X11/Xpoll.h" + #include <X11/Xtrans/Xtrans.h> #include <stdio.h> #include <errno.h>
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
