summaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-11-24 11:21:11 +0000
committerRoy Marples <roy@marples.name>2008-11-24 11:21:11 +0000
commit74d48421744e227b4086cf2edf27220387d70380 (patch)
tree67862023aa280b4469fb5edfb9a3855928249578 /common.h
parent7ba2eab95d13c892cc1d0ff6c40403d01a921270 (diff)
downloaddhcpcd-74d48421744e227b4086cf2edf27220387d70380.tar.xz
Work out __restrict better.
Diffstat (limited to 'common.h')
-rw-r--r--common.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/common.h b/common.h
index 1f78b35f..e12d0054 100644
--- a/common.h
+++ b/common.h
@@ -56,9 +56,16 @@
# 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