From: Guillem Jover Date: Wed, 25 May 2011 19:27:12 +0000 (+0200) Subject: Define __dead2 and __pure2 to actual gcc attributes if possible X-Git-Tag: 0.3.0~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87dd203c26f2828de9506da5a0073aa0f6593c9e;p=thirdparty%2Flibbsd.git Define __dead2 and __pure2 to actual gcc attributes if possible --- diff --git a/include/bsd/sys/cdefs.h b/include/bsd/sys/cdefs.h index 3c31b05..a1ea034 100644 --- a/include/bsd/sys/cdefs.h +++ b/include/bsd/sys/cdefs.h @@ -50,11 +50,19 @@ #endif #ifndef __dead2 -# define __dead2 +# if LIBBSD_GCC_VERSION >= 0x0207 +# define __dead2 __attribute__((__noreturn__)) +# else +# define __dead2 +# endif #endif #ifndef __pure2 -# define __pure2 +# if LIBBSD_GCC_VERSION >= 0x0207 +# define __pure2 __attribute__((__const__)) +# else +# define __pure2 +# endif #endif /* Linux headers define a struct with a member names __unused.