From: Enrico Scholz Date: Fri, 26 Dec 2003 00:20:08 +0000 (+0000) Subject: differ between >=3.3 and below at certain options X-Git-Tag: VERSION_0_10~1043 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42f574e5245952ef869e72cdb0513c3f8ea20ade;p=util-vserver.git differ between >=3.3 and below at certain options added 'restrict' workarounds git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@472 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/compat.h b/util-vserver/compat.h index e22641f..125d875 100644 --- a/util-vserver/compat.h +++ b/util-vserver/compat.h @@ -31,17 +31,24 @@ #if defined(__GNUC__) # define UNUSED __attribute__((__unused__)) # define NORETURN __attribute__((__noreturn__)) -# if __GNUC__ >= 3 +# if __GNUC__>3 || (__GNUC__==3 && __GNUC__MINOR>=3) +# define NONNULL(ARGS) __attribute__((__nonnull__ ARGS)) # define ALWAYSINLINE __attribute__((__always_inline__)) # else +# define NONNULL(ARGS) # define ALWAYSINLINE # endif #else +# define NONNULL(ARGS) # define UNUSED # define NORETURN # define ALWAYSINLINE #endif +#if !defined(__STDC_VERSION__) || (__STDC_VERSION__<199901L) +# define restrict +#endif + #if !defined(HAVE_DECL_MS_MOVE) || !(HAVE_DECL_MS_MOVE) // from # define MS_MOVE 8192