svn commit: r189247 - head/sys/sys

Ed Schouten ed at FreeBSD.org
Sun Mar 1 09:44:31 PST 2009


Author: ed
Date: Sun Mar  1 17:44:31 2009
New Revision: 189247
URL: http://svn.freebsd.org/changeset/base/189247

Log:
  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.

Modified:
  head/sys/sys/cdefs.h

Modified: head/sys/sys/cdefs.h
==============================================================================
--- head/sys/sys/cdefs.h	Sun Mar  1 16:50:46 2009	(r189246)
+++ head/sys/sys/cdefs.h	Sun Mar  1 17:44:31 2009	(r189247)
@@ -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


More information about the svn-src-head mailing list