[U-Boot] [PATCH] include: define bool type in a more portable way

Graeme Russ graeme.russ at gmail.com
Tue Nov 19 07:14:20 CET 2013


Hi Masahiro Yamada,


On Tue, Nov 19, 2013 at 4:59 PM, Masahiro Yamada
<yamada.m at jp.panasonic.com>wrote:

> Hello Graeme
>
>
> > Why would hacking /include/linux/stddef.h and /include/linux/types.h be
> > preferable?
>
> The reason is this:
> > > Personally, I prefer (2) to (1) because
> > >  -  we don't need to tweak common/cmd_test.c any more
> > >  -  we can reduce the conflict if we have a plan to update
> > >       Linux-originated header files.
>
>
> Some Linux header files are very old.
> Accoding to git log, for example, include/linux/types.h
> was added at 2000 and include/linux/stddef.h at 2002.
>

I figured that might be the case after I hit send :)


>
> We imported Linux headers and
> generally add an item to them
> every time we find some necessary feature is missing.
> For example, this patch:
> http://patchwork.ozlabs.org/patch/291435/
> Adjusting little by little is one strategy.
> But we might think of synchronizing Linux-related headers
> with new ones in future.
>

Would be interesting to see what kinds of chaos would ensue if we did...


> We have lots of files imported from Linux Kernel.
> So, basiclly, there is more or less advantage to mimic Linux's way.
>

Agreed - we use the Linux coding standards and probably >90% of our build
probably happen on Linux machines.


> Anyway, this is my personal option.
> Opinions about this item may differ among people.
>

I also think it would be better to have all headers under /include/linux/
synchronised with Linux. But I've been out of the game so long now, I don't
know if I've inadvertently started a flame war...

Regards,

Graeme

P.S. Apologies for my previous top-post - please don't hurt me


More information about the U-Boot mailing list