Re: [Patch] Always include <linux/types.h>
From: Alexey Dobriyan
Date: Wed Nov 05 2008 - 12:20:18 EST
On Wed, Nov 05, 2008 at 05:39:41PM +0100, Jörn Engel wrote:
> Hardly any file in the kernel can be compiled without including
> <linux/types.h>, directly or indirectly. And I'd wager a beer that
> noone can find a non-trivial example. I couldn't.
>
> So instead of sprinkling even more #include <linux/types.h> everywhere -
> 140 headers in include/linux/ would need that to compile standalone -
> let us just pass it automatically.
>
> The existing 4000 odd includes for types.h, plus some 300 each for
> compiler.h and stddef.h, which get pulled through types.h, can get
> removed at leasure.
>
> --- a/Makefile
> +++ b/Makefile
> @@ -326,7 +326,8 @@ AFLAGS_KERNEL =
> # Needed to be compatible with the O= option
> LINUXINCLUDE := -Iinclude \
> $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \
> - -include include/linux/autoconf.h
> + -include include/linux/autoconf.h \
> + -include include/linux/types.h
This is only going to slow down compilation and types.h is not causing much
compilation problems, in fact, I can't recall a compilation problem due to
types.h. Contary to config.h situation which was a pain.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/