[PATCH:xfs 1/2] FD_SETSIZE fixes.

Emil Velikov emil.l.velikov at gmail.com
Mon Jul 20 09:00:43 PDT 2015


Hi Thomas,

On 19 July 2015 at 08:56, Thomas Klausner <wiz at netbsd.org> wrote:
> From: Matthew Green <mrg at NetBSD.org>
>
> 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.

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
:-)

Cheers,
Emil


More information about the xorg-devel mailing list