diff options
author | Stefan Fritsch <sf@cvs.openbsd.org> | 2013-06-08 19:06:52 +0000 |
---|---|---|
committer | Stefan Fritsch <sf@cvs.openbsd.org> | 2013-06-08 19:06:52 +0000 |
commit | 41a55873d47f9036578b951acc755a77be819dc0 (patch) | |
tree | d508695c298843d5952224a433ba2c924446f3f1 /sys/lib | |
parent | 6f5d7d986a8441a86a60a6ff989d87fb8b2bc337 (diff) |
Add CTASSERT macro, for compile time assertions
ok kettenis@
Diffstat (limited to 'sys/lib')
-rw-r--r-- | sys/lib/libkern/libkern.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/lib/libkern/libkern.h b/sys/lib/libkern/libkern.h index a2e6efccd3f..cb9817bce7f 100644 --- a/sys/lib/libkern/libkern.h +++ b/sys/lib/libkern/libkern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libkern.h,v 1.29 2012/04/26 01:22:31 matthew Exp $ */ +/* $OpenBSD: libkern.h,v 1.30 2013/06/08 19:06:50 sf Exp $ */ /* $NetBSD: libkern.h,v 1.7 1996/03/14 18:52:08 christos Exp $ */ /*- @@ -138,6 +138,9 @@ abs(int j) #endif #endif +#define CTASSERT(x) extern char _ctassert[(x) ? 1 : -1 ] \ + __attribute__((__unused__)) + /* Prototypes for non-quad routines. */ void __assert(const char *, const char *, int, const char *) __attribute__ ((__noreturn__)); |