[U-Boot] [PATCH 3/9] common: include <inttypes.h> always
Patrick DELAUNAY
patrick.delaunay at st.com
Thu Aug 2 08:46:32 UTC 2018
Hi Philipp
> -----Original Message-----
> From: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
> Sent: jeudi 26 juillet 2018 16:00
>
> With the ram-size variable changed to u64, we'll need appropriate macros for
> printing u64 values correctly either in 32bit builds (i.e. ILP32 models) or in 64bit
> builds (i.e. LP64 models). Best to make the PRIx64 macro available everywhere.
>
> This include inttypes.h from common.h to make the various macros for
> formatted printing available to everyone.
>
> Signed-off-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
> ---
>
> include/common.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/include/common.h b/include/common.h index 940161f..9de9145
> 100644
> --- a/include/common.h
> +++ b/include/common.h
> @@ -30,6 +30,7 @@ typedef volatile unsigned char vu_char;
> #include <linux/stringify.h>
> #include <asm/ptrace.h>
> #include <stdarg.h>
> +#include <inttypes.h>
> #include <stdio.h>
> #include <linux/kernel.h>
I think the include should be moved after the line 40
and __STDC_FORMAT_MACROS definition :
-/* Bring in printf format macros if inttypes.h is included */
+/* Bring in printf format macros defined in inttypes.h */
#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
Regards
Patrick
More information about the U-Boot
mailing list