summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2004-07-22 09:20:51 +0000
committertjr <tjr@FreeBSD.org>2004-07-22 09:20:51 +0000
commitc953c4fb4b3a082a75c8f126d70fab34c62b55fe (patch)
tree83319fd67219bf2cb5c1f719a0eb87601853d697 /sys
parent828910ece4ecf45b2414eeab94d4e1ecbf5bb652 (diff)
downloadFreeBSD-src-c953c4fb4b3a082a75c8f126d70fab34c62b55fe.zip
FreeBSD-src-c953c4fb4b3a082a75c8f126d70fab34c62b55fe.tar.gz
Add a macro, __pure, which expands to __attribute__((__pure__)) on gcc
versions that support it (>=2.96). This is similar to but not the same as the __pure macro that was removed in rev. 1.21.
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/cdefs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index 2cc5a55..8ce116d 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -157,6 +157,12 @@
#endif
#endif
+#if __GNUC_PREREQ__(2, 96)
+#define __pure __attribute__((__pure__))
+#else
+#define __pure
+#endif
+
#if __GNUC_PREREQ__(3, 1) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800)
#define __always_inline __attribute__((__always_inline__))
#else
OpenPOWER on IntegriCloud