Add CTASSERT (compile time assert) from FreeBSD.

Causes sources to fail to compile:
<file>:<line>: error: size of array '__ctassert<line>' is negative
This commit is contained in:
matt 2008-07-02 14:39:20 +00:00
parent 5eeb4f695a
commit 67b10687dc
1 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: libkern.h,v 1.79 2008/03/25 23:24:38 christos Exp $ */
/* $NetBSD: libkern.h,v 1.80 2008/07/02 14:39:20 matt Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -192,6 +192,10 @@ tolower(int ch)
#endif
#endif
#define CTASSERT(x) _CTASSERT(x, __LINE__)
#define _CTASSERT(x, y) __CTASSERT(x, y)
#define __CTASSERT(x, y) typedef char __ctassert ## y[(x) ? 1 : -1];
#ifndef DIAGNOSTIC
#define _DIAGASSERT(a) (void)0
#ifdef lint