sys/boot: add common CTASSERT definition

This commit is contained in:
Andriy Gapon 2012-05-09 07:55:42 +00:00
parent 18cf7ddfca
commit 5ef10e566c
3 changed files with 7 additions and 16 deletions

View File

@ -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_ */

View File

@ -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.

View File

@ -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 {