From: Roy Marples Date: Mon, 24 Nov 2008 11:21:11 +0000 (+0000) Subject: Work out __restrict better. X-Git-Tag: v5.0.0~169 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74d48421744e227b4086cf2edf27220387d70380;p=thirdparty%2Fdhcpcd.git Work out __restrict better. --- 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