* include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
pointer, which can cause warnings. Support 64-bit addresses.
2008-07-04 Pavel Roskin <proski@gnu.org>
+ * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
+ pointer, which can cause warnings. Support 64-bit addresses.
+
* util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
of sizeof(long). This fixes PowerPC image generation on x86_64.
#include <grub/symbol.h>
#include <grub/err.h>
-#define ALIGN_UP(addr, align) ((long)((char *)addr + align - 1) & ~(align - 1))
+#define ALIGN_UP(addr, align) (((grub_uint64_t)addr + align - 1) & ~(align - 1))
#define grub_dprintf(condition, fmt, args...) grub_real_dprintf(__FILE__, __LINE__, condition, fmt, ## args);
/* XXX: If grub_memmove is too slow, we must implement grub_memcpy. */