From: Vladimir Serbinenko Date: Mon, 16 Dec 2013 13:34:23 +0000 (+0100) Subject: * include/grub/efi/api.h: Define (u)intn_t based on pointer size and X-Git-Tag: grub-2.02-beta1~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e38c31a4b5a26549e3f5637e2d00247eb72a159;p=thirdparty%2Fgrub.git * include/grub/efi/api.h: Define (u)intn_t based on pointer size and not on long. --- diff --git a/ChangeLog b/ChangeLog index aae9c6977..81c4f2786 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-12-16 Vladimir Serbinenko + + * include/grub/efi/api.h: Define (u)intn_t based on pointer size and + not on long. + 2013-12-16 Vladimir Serbinenko Handle X86_64_PC64 relocation. diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h index 68fc90ffb..956cce2de 100644 --- a/include/grub/efi/api.h +++ b/include/grub/efi/api.h @@ -449,8 +449,13 @@ typedef enum grub_efi_reset_type grub_efi_reset_type_t; /* Types. */ typedef char grub_efi_boolean_t; -typedef long grub_efi_intn_t; -typedef unsigned long grub_efi_uintn_t; +#if GRUB_CPU_SIZEOF_VOID_P == 8 +typedef grub_int64_t grub_efi_intn_t; +typedef grub_uint64_t grub_efi_uintn_t; +#else +typedef grub_int32_t grub_efi_intn_t; +typedef grub_uint32_t grub_efi_uintn_t; +#endif typedef grub_int8_t grub_efi_int8_t; typedef grub_uint8_t grub_efi_uint8_t; typedef grub_int16_t grub_efi_int16_t; @@ -467,7 +472,7 @@ typedef grub_uint16_t grub_efi_char16_t; typedef grub_efi_intn_t grub_efi_status_t; #define GRUB_EFI_ERROR_CODE(value) \ - ((1L << (sizeof (grub_efi_status_t) * 8 - 1)) | (value)) + ((1LL << (sizeof (grub_efi_status_t) * 8 - 1)) | (value)) #define GRUB_EFI_WARNING_CODE(value) (value)