]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
Define __dead2 and __pure2 to actual gcc attributes if possible
authorGuillem Jover <guillem@hadrons.org>
Wed, 25 May 2011 19:27:12 +0000 (21:27 +0200)
committerGuillem Jover <guillem@hadrons.org>
Sat, 28 May 2011 08:31:07 +0000 (10:31 +0200)
include/bsd/sys/cdefs.h

index 3c31b05e9e023c1768f9368dd88effc419850f8b..a1ea034ee8bd5fd42ed256c969c6dd68dbe91c09 100644 (file)
 #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.