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.
This commit is contained in:
proski 2008-07-04 02:12:54 +00:00
parent fdecb8fdbb
commit 1759aa57d4
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
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.

View File

@ -25,7 +25,7 @@
#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. */