Module Name: src
Committed By: joerg
Date: Fri Feb 17 18:58:51 UTC 2012
Modified Files:
src/sys/sys: cdefs.h
Log Message:
PR 46040:
If the current compiler doesn't support C99, check if it is compatible
with GCC 2.92. In that case, use the protected __restricted__ form.
In any other case, default to removing __restricted.
To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 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.89 src/sys/sys/cdefs.h:1.90
--- src/sys/sys/cdefs.h:1.89 Sat Nov 5 09:27:06 2011
+++ src/sys/sys/cdefs.h Fri Feb 17 18:58:51 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: cdefs.h,v 1.89 2011/11/05 09:27:06 joerg Exp $ */
+/* $NetBSD: cdefs.h,v 1.90 2012/02/17 18:58:51 joerg Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -338,7 +338,9 @@
#define __restrict /* delete __restrict when not supported */
#elif __STDC_VERSION__ >= 199901L
#define __restrict restrict
-#elif !__GNUC_PREREQ__(2, 92)
+#elif __GNUC_PREREQ__(2, 92)
+#define __restrict __restrict__
+#else
#define __restrict /* delete __restrict when not supported */
#endif