]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* include/grub/efi/api.h: Define (u)intn_t based on pointer size and
authorVladimir Serbinenko <phcoder@gmail.com>
Mon, 16 Dec 2013 13:34:23 +0000 (14:34 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Mon, 16 Dec 2013 13:34:23 +0000 (14:34 +0100)
not on long.

ChangeLog
include/grub/efi/api.h

index aae9c69770c9e2d1d135d666d03dcf5345d22de1..81c4f2786b39a85dac87f0e9254f17f0ca425b2c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-12-16  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * include/grub/efi/api.h: Define (u)intn_t based on pointer size and
+       not on long.
+
 2013-12-16  Vladimir Serbinenko  <phcoder@gmail.com>
 
        Handle X86_64_PC64 relocation.
index 68fc90ffb7b2ab7205f41fed2a06eb88c563570d..956cce2de79042a1f5de54694421aff6165656b7 100644 (file)
@@ -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)