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

2013-11-18 Thread Graeme Russ
Hi Masahiro Yamada, On Tue, Nov 19, 2013 at 4:59 PM, Masahiro Yamada 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

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

2013-11-18 Thread Masahiro Yamada
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 > >

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

2013-11-18 Thread Graeme Russ
Hi Masahiro Yamada, Why would hacking /include/linux/stddef.h and /include/linux/types.h be preferable? Regards, Graeme On Tue, Nov 19, 2013 at 3:37 PM, Masahiro Yamada wrote: > Hi. > > I posted v2 of this patch > http://patchwork.ozlabs.org/patch/292258/ > > > I think both of two solutions w

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

2013-11-18 Thread Masahiro Yamada
Hi. I posted v2 of this patch http://patchwork.ozlabs.org/patch/292258/ I think both of two solutions work. (1) include in common/cmd_test.c but undef true and false. http://patchwork.ozlabs.org/patch/292247/ (2) Do not include and define true and false with enum. h

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

2013-11-18 Thread Masahiro Yamada
Hello Wolfgang, Tom. > > Currently U-boot defins bool type by including > > rather than defining directly. > > But it does not work for some cross compilers. > > Can you explain why this fails? At first, I have to admit that I misunderstood the reason of the error. It turned out that this is

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

2013-11-18 Thread Måns Rullgård
Tom Rini writes: > On Mon, Nov 18, 2013 at 05:28:56PM +0100, Wolfgang Denk wrote: >> Dear Masahiro Yamada, >> >> In message <1384770105-32364-1-git-send-email-yamad...@jp.panasonic.com> you >> wrote: >> > Currently U-boot defins bool type by including >> > rather than defining directly. >> > B

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

2013-11-18 Thread Tom Rini
On Mon, Nov 18, 2013 at 05:28:56PM +0100, Wolfgang Denk wrote: > Dear Masahiro Yamada, > > In message <1384770105-32364-1-git-send-email-yamad...@jp.panasonic.com> you > wrote: > > Currently U-boot defins bool type by including > > rather than defining directly. > > But it does not work for some

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

2013-11-18 Thread Wolfgang Denk
Dear Masahiro Yamada, In message <1384770105-32364-1-git-send-email-yamad...@jp.panasonic.com> you wrote: > Currently U-boot defins bool type by including > rather than defining directly. > But it does not work for some cross compilers. Can you explain why this fails? AFAICT, is a compiler pr

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

2013-11-18 Thread Masahiro Yamada
Currently U-boot defins bool type by including rather than defining directly. But it does not work for some cross compilers. This commit changes header files to define bool, true, false in the same way as Linux Kernel does. Signed-off-by: Masahiro Yamada --- Refer to include/linux/types.h and