From 42f574e5245952ef869e72cdb0513c3f8ea20ade Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Fri, 26 Dec 2003 00:20:08 +0000 Subject: [PATCH] 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 --- util-vserver/compat.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 -- 1.8.1.5