]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Work out __restrict better.
authorRoy Marples <roy@marples.name>
Mon, 24 Nov 2008 11:21:11 +0000 (11:21 +0000)
committerRoy Marples <roy@marples.name>
Mon, 24 Nov 2008 11:21:11 +0000 (11:21 +0000)
common.h

index 1f78b35f8983b88b4d999dec517a675d40b0f55b..e12d0054aeabba70e97f786ca36540125171d3e9 100644 (file)
--- a/common.h
+++ b/common.h
 # define _unused
 #endif
 
-/* We require a c99 compiler, but we need this define to satisfy lint */
+/* We don't really need this as our supported systems define __restrict
+ * automatically for us, but it is here for completeness. */
 #ifndef __restrict
-# define __restrict restrict
+# if defined(__lint__)
+#  define __restrict
+# elif __STDC_VERSION__ >= 199901L
+#  define __restrict restrict
+# elif !(2 < __GNUC__ || (2 == __GNU_C && 95 <= __GNUC_VERSION__))
+#  define __restrict
+# endif
 #endif
 
 #ifndef HAVE_ARC4RANDOM