Module Name: src
Committed By: pooka
Date: Sun Dec 15 21:15:41 UTC 2013
Modified Files:
src/sys/lib/libkern: libkern.h
Log Message:
Allow overriding CTASSERT. This helps with building NetBSD sources with
compilers that don't support __COUNTER__ -- shifting the CTASSERTs
around to avoid __LINE__ conflicts is a hopeless struggle.
To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/lib/libkern/libkern.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/lib/libkern/libkern.h
diff -u src/sys/lib/libkern/libkern.h:1.110 src/sys/lib/libkern/libkern.h:1.111
--- src/sys/lib/libkern/libkern.h:1.110 Wed Dec 11 01:24:08 2013
+++ src/sys/lib/libkern/libkern.h Sun Dec 15 21:15:41 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: libkern.h,v 1.110 2013/12/11 01:24:08 joerg Exp $ */
+/* $NetBSD: libkern.h,v 1.111 2013/12/15 21:15:41 pooka Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -189,9 +189,15 @@ tolower(int ch)
#endif
#endif
+#ifndef CTASSERT
#define CTASSERT(x) __CTASSERT(x)
+#endif
+#ifndef CTASSERT_SIGNED
#define CTASSERT_SIGNED(x) __CTASSERT(((typeof(x))-1) < 0)
+#endif
+#ifndef CTASSERT_UNSIGNED
#define CTASSERT_UNSIGNED(x) __CTASSERT(((typeof(x))-1) >= 0)
+#endif
#ifndef DIAGNOSTIC
#define _DIAGASSERT(a) (void)0