There are already constant macros defined for unsigned integers but no for signed integers. Add macro constants for format specifiers of the latter.
Suggested-by: Daniel Kiper <daniel.ki...@oracle.com> Signed-off-by: Javier Martinez Canillas <javi...@redhat.com> --- (no changes since v1) include/grub/types.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/grub/types.h b/include/grub/types.h index b36b26a79d4..f460ef18c71 100644 --- a/include/grub/types.h +++ b/include/grub/types.h @@ -86,10 +86,16 @@ typedef signed char grub_int8_t; typedef short grub_int16_t; typedef int grub_int32_t; +# define PRIxGRUB_INT32_T "x" +# define PRIuGRUB_INT32_T "d" #if GRUB_CPU_SIZEOF_LONG == 8 typedef long grub_int64_t; +# define PRIxGRUB_INT64_T "lx" +# define PRIdGRUB_INT64_T "ld" #else typedef long long grub_int64_t; +# define PRIxGRUB_INT64_T "llx" +# define PRIdGRUB_INT64_T "lld" #endif typedef unsigned char grub_uint8_t; -- 2.31.1 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel