types: Define PRI{x,d}GRUB_INT{32,64}_T format specifiers

There are already PRI*_T constants defined for unsigned integers but not
for signed integers. Add format specifiers for the latter.

Suggested-by: Daniel Kiper <daniel.kiper@oracle.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Javier Martinez Canillas 2021-05-24 19:40:04 +02:00 committed by Daniel Kiper
parent f17e8b9ed2
commit af54062b54

View File

@ -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 PRIdGRUB_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;