From 083d16798e9ab51e3b2cd7fb94c7e960bb92f8de Mon Sep 17 00:00:00 2001 From: robertmh Date: Mon, 26 Oct 2009 18:04:37 +0000 Subject: [PATCH] 2009-10-26 Robert Millan * gensymlist.sh.in (COMPILE_TIME_ASSERT): Copy macro declaration from here ... * include/grub/misc.h (COMPILE_TIME_ASSERT): ... to here. --- ChangeLog | 6 ++++++ include/grub/misc.h | 1 + 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2a9c04844..afe67af2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-10-26 Robert Millan + + * gensymlist.sh.in (COMPILE_TIME_ASSERT): Copy macro declaration + from here ... + * include/grub/misc.h (COMPILE_TIME_ASSERT): ... to here. + 2009-10-26 Robert Millan * Makefile.in (docs/grub.info): Use make syntax to ignore errors diff --git a/include/grub/misc.h b/include/grub/misc.h index 7589f43a2..e3a062898 100644 --- a/include/grub/misc.h +++ b/include/grub/misc.h @@ -28,6 +28,7 @@ #define ALIGN_UP(addr, align) \ ((addr + (typeof (addr)) align - 1) & ~((typeof (addr)) align - 1)) #define ARRAY_SIZE(array) (sizeof (array) / sizeof (array[0])) +#define COMPILE_TIME_ASSERT(cond) switch (0) { case 1: case !(cond): ; } #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. */