Re: [U-Boot] [PATCH 20/21] Add inttypes.h

2018-12-10 Thread Simon Glass
Hi Masahiro,

On Wed, 5 Dec 2018 at 22:51, Masahiro Yamada
 wrote:
>
> On Sat, Nov 24, 2018 at 1:43 PM Simon Glass  wrote:
> >
> > Even if U-Boot does not use this, some libraries do. Add back this header
> > file so that the build does not fall back to using the host version, which
> > may include stdint.h and break the build due to conflicts with uint64_t,
> > etc.
>
>
>
> The root cause of the problem might be,
> those libraries mix up  from U-Boot
> and  from the compiler.
>
>
> Linux kernel has a different  for user-space tools
> in tools/include/linux/types.h

Right, but how does it enforce those tools using that file? It is non-standard.

> I agree that U-Boot has been screwed up here
> to a hopeless level.

The problem is not U-Boot. If a library that links against U-Boot
includes stdint.h, it expects it to work.

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 20/21] Add inttypes.h

2018-12-05 Thread Masahiro Yamada
On Sat, Nov 24, 2018 at 1:43 PM Simon Glass  wrote:
>
> Even if U-Boot does not use this, some libraries do. Add back this header
> file so that the build does not fall back to using the host version, which
> may include stdint.h and break the build due to conflicts with uint64_t,
> etc.



The root cause of the problem might be,
those libraries mix up  from U-Boot
and  from the compiler.


Linux kernel has a different  for user-space tools
in tools/include/linux/types.h



I agree that U-Boot has been screwed up here
to a hopeless level.



-- 
Best Regards
Masahiro Yamada
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 20/21] Add inttypes.h

2018-12-05 Thread sjg
Even if U-Boot does not use this, some libraries do. Add back this header
file so that the build does not fall back to using the host version, which
may include stdint.h and break the build due to conflicts with uint64_t,
etc.

This partially reverts commit dee37fc99d94 ("Remove  includes
and PRI* usages in printf() entirely")

The only change from the file that was in U-Boot until recently is that it
now comes twice as close to passing checkpatch. The remaining warnings
pertain to the typedefs, which checkpatch does not like.

Signed-off-by: Simon Glass 
---

 include/inttypes.h | 271 +
 1 file changed, 271 insertions(+)
 create mode 100644 include/inttypes.h

Applied to u-boot-dm/master, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot