summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2002-04-01 21:55:00 +0000
committerjake <jake@FreeBSD.org>2002-04-01 21:55:00 +0000
commit15dc222b823665d63da106fbde3ab6ead56a87a3 (patch)
tree493b460bc4cbf164ebc2c453a73471911d8857e5 /sys/sparc64
parent6bb0c0b2661593317904cfd02cc3036cff3beefd (diff)
downloadFreeBSD-src-15dc222b823665d63da106fbde3ab6ead56a87a3.zip
FreeBSD-src-15dc222b823665d63da106fbde3ab6ead56a87a3.tar.gz
Move the CTASSERT macro from MD code to systm.h alongside KASSERT so other
code can use it. This takes a single constant argument and fails to compile if it is 0 (false). The main application of this is to make assertions about structure sizes at compile time, in order to validate assumptions made in other code. Examples: CTASSERT(sizeof(struct foo) == FOO_SIZEOF); CTASSERT(sizeof(struct foo) == (1 << FOO_SHIFT)); Requested by: jhb, phk
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/include/param.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/sys/sparc64/include/param.h b/sys/sparc64/include/param.h
index a4404cf..36aef81 100644
--- a/sys/sparc64/include/param.h
+++ b/sys/sparc64/include/param.h
@@ -176,9 +176,5 @@
#define pgtok(x) ((unsigned long)(x) * (PAGE_SIZE / 1024))
-#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 /* !_MACHINE_PARAM_H_ */
#endif /* !_NO_NAMESPACE_POLLUTION */
OpenPOWER on IntegriCloud