summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-03-01 17:44:31 +0000
committered <ed@FreeBSD.org>2009-03-01 17:44:31 +0000
commit9d61d0915924cc65e5f83361addef0bb8d3a7ea1 (patch)
tree264b269dd27ecdedbe4f3aeadf9a889a2311430b
parent4f862800c642b315839f3fa84465955ea08658b1 (diff)
downloadFreeBSD-src-9d61d0915924cc65e5f83361addef0bb8d3a7ea1.zip
FreeBSD-src-9d61d0915924cc65e5f83361addef0bb8d3a7ea1.tar.gz
Hide __restrict from lint, just like we do with other keywords.
Unlike GCC, LLVM defines __STDC_VERSION__ to 199901L by default. This means `restrict' keywords in files end up being given to lint, which results in errors during compilation of usr.bin/xlint. Other keywords are also expanded to nothing when using lint, so do the same with restrict.
-rw-r--r--sys/sys/cdefs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index b0d88f3..44bed25 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -268,7 +268,7 @@
* software that is unaware of C99 keywords.
*/
#if !(__GNUC__ == 2 && __GNUC_MINOR__ == 95)
-#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901
+#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901 || defined(lint)
#define __restrict
#else
#define __restrict restrict
OpenPOWER on IntegriCloud