Module Name: src Committed By: matt Date: Sat Feb 19 02:21:21 UTC 2011
Modified Files: src/sys/sys: cdefs.h Log Message: Make __CTASSERT use __COUNTER__ instead of __LINE__ if the cpp supports it. To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/sys/sys/cdefs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/sys/cdefs.h diff -u src/sys/sys/cdefs.h:1.83 src/sys/sys/cdefs.h:1.84 --- src/sys/sys/cdefs.h:1.83 Sat Feb 19 02:01:46 2011 +++ src/sys/sys/cdefs.h Sat Feb 19 02:21:21 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cdefs.h,v 1.83 2011/02/19 02:01:46 matt Exp $ */ +/* $NetBSD: cdefs.h,v 1.84 2011/02/19 02:21:21 matt Exp $ */ /* * Copyright (c) 1991, 1993 @@ -128,7 +128,11 @@ /* * Compile Time Assertion. */ +#ifdef __COUNTER__ +#define __CTASSERT(x) __CTASSERT0(x, __ctassert, __COUNTER__) +#else #define __CTASSERT(x) __CTASSERT0(x, __ctassert, __LINE__) +#endif #define __CTASSERT0(x, y, z) __CTASSERT1(x, y, z) #define __CTASSERT1(x, y, z) typedef char y ## z[(x) ? 1 : -1];