diff options
author | Heiko Schocher <hs@denx.de> | 2011-06-08 23:07:05 +0000 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-07-27 23:45:37 +0200 |
commit | c00e17c7fe184c966e34ad48bf753c930ebac1df (patch) | |
tree | 33314a10f913b716429b5a468ec2da0ae19a0b6f /include/common.h | |
parent | f7fb46a8f3c74ca49a0c372836e4a160085e95fe (diff) | |
download | u-boot-c00e17c7fe184c966e34ad48bf753c930ebac1df.zip u-boot-c00e17c7fe184c966e34ad48bf753c930ebac1df.tar.gz u-boot-c00e17c7fe184c966e34ad48bf753c930ebac1df.tar.bz2 |
common: move BUILD_BUG_ON define to common.h
see discussion also here:
http://patchwork.ozlabs.org/patch/75309/
Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Holger Brunck <holger.brunck@keymile.com>
Diffstat (limited to 'include/common.h')
-rw-r--r-- | include/common.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h index 6061643..1572791 100644 --- a/include/common.h +++ b/include/common.h @@ -137,6 +137,9 @@ typedef volatile unsigned char vu_char; #define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0) #endif /* BUG */ +/* Force a compilation error if condition is true */ +#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) + typedef void (interrupt_handler_t)(void *); #include <asm/u-boot.h> /* boot information for Linux kernel */ |