diff options
author | avg <avg@FreeBSD.org> | 2012-05-09 07:55:42 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2012-05-09 07:55:42 +0000 |
commit | c4c31a507d2ada4ae55e23d07381c15a834cbc0c (patch) | |
tree | d777cb5a84a9961148f4cfc7b130e0f9c48125de | |
parent | f8f35ffdf562c6c5392f928af11a11c335c562c3 (diff) | |
download | FreeBSD-src-c4c31a507d2ada4ae55e23d07381c15a834cbc0c.zip FreeBSD-src-c4c31a507d2ada4ae55e23d07381c15a834cbc0c.tar.gz |
sys/boot: add common CTASSERT definition
-rw-r--r-- | sys/boot/common/bootstrap.h | 6 | ||||
-rw-r--r-- | sys/boot/i386/efi/reloc.c | 11 | ||||
-rw-r--r-- | sys/boot/sparc64/loader/main.c | 6 |
3 files changed, 7 insertions, 16 deletions
diff --git a/sys/boot/common/bootstrap.h b/sys/boot/common/bootstrap.h index 7f011c7..4c92ba8 100644 --- a/sys/boot/common/bootstrap.h +++ b/sys/boot/common/bootstrap.h @@ -327,4 +327,10 @@ void dev_cleanup(void); time_t time(time_t *tloc); +#ifndef CTASSERT /* Allow lint to override */ +#define CTASSERT(x) _CTASSERT(x, __LINE__) +#define _CTASSERT(x, y) __CTASSERT(x, y) +#define __CTASSERT(x, y) typedef char __assert ## y[(x) ? 1 : -1] +#endif + #endif /* !_BOOTSTRAP_H_ */ diff --git a/sys/boot/i386/efi/reloc.c b/sys/boot/i386/efi/reloc.c index 24eed0a..96f9241 100644 --- a/sys/boot/i386/efi/reloc.c +++ b/sys/boot/i386/efi/reloc.c @@ -30,16 +30,7 @@ __FBSDID("$FreeBSD$"); #include <sys/types.h> #include <sys/elf32.h> #include <efi.h> - -/* - * XXX: we can't include sys/systm.h. - */ -#ifndef CTASSERT /* Allow lint to override */ -#define CTASSERT(x) _CTASSERT(x, __LINE__) -#define _CTASSERT(x, y) __CTASSERT(x, y) -#define __CTASSERT(x, y) typedef char __assert ## y[(x) ? 1 : -1] -#endif - +#include <bootstrap.h> /* * A simple relocator for IA32 EFI binaries. diff --git a/sys/boot/sparc64/loader/main.c b/sys/boot/sparc64/loader/main.c index dbbf08d..cb0dda2 100644 --- a/sys/boot/sparc64/loader/main.c +++ b/sys/boot/sparc64/loader/main.c @@ -74,12 +74,6 @@ __FBSDID("$FreeBSD$"); #include "libofw.h" #include "dev_net.h" -#ifndef CTASSERT -#define CTASSERT(x) _CTASSERT(x, __LINE__) -#define _CTASSERT(x, y) __CTASSERT(x, y) -#define __CTASSERT(x, y) typedef char __assert ## y[(x) ? 1 : -1] -#endif - extern char bootprog_name[], bootprog_rev[], bootprog_date[], bootprog_maker[]; enum { |