Index: include/grub/types.h =================================================================== --- include/grub/types.h (revision 2440) +++ include/grub/types.h (working copy) @@ -64,8 +64,14 @@ typedef int grub_int32_t; #if GRUB_CPU_SIZEOF_VOID_P == 8 typedef long grub_int64_t; +#define GRUB_PRIi64 "li" +#define GRUB_PRId64 "ld" +#define GRUB_INT64_C(x) (x ## L) #else typedef long long grub_int64_t; +#define GRUB_PRIi64 "lli" +#define GRUB_PRId64 "lld" +#define GRUB_INT64_C(x) (x ## LL) #endif typedef unsigned char grub_uint8_t; @@ -73,8 +79,18 @@ typedef unsigned grub_uint32_t; #if GRUB_CPU_SIZEOF_VOID_P == 8 typedef unsigned long grub_uint64_t; +#define GRUB_PRIu64 "lu" +#define GRUB_PRIo64 "lo" +#define GRUB_PRIx64 "lx" +#define GRUB_PRIX64 "lX" +#define GRUB_UINT64_C(x) (x ## UL) #else typedef unsigned long long grub_uint64_t; +#define GRUB_PRIu64 "llu" +#define GRUB_PRIo64 "llo" +#define GRUB_PRIx64 "llx" +#define GRUB_PRIX64 "llX" +#define GRUB_UINT64_C(x) (x ## ULL) #endif /* Misc types. */