diff options
author | theraven <theraven@FreeBSD.org> | 2011-12-24 13:28:49 +0000 |
---|---|---|
committer | theraven <theraven@FreeBSD.org> | 2011-12-24 13:28:49 +0000 |
commit | d1c67819db000c02d3a9c79f3651c10aeedad1a0 (patch) | |
tree | bac3c150e21cb269e35e574177302413ce62a824 /sys/sys | |
parent | a0d65754e36d3fde50024b2941428e18173bbba3 (diff) | |
download | FreeBSD-src-d1c67819db000c02d3a9c79f3651c10aeedad1a0.zip FreeBSD-src-d1c67819db000c02d3a9c79f3651c10aeedad1a0.tar.gz |
Some GCC-compatibility definitions. Define clang's feature test pseudomacros
to always evaluate to 0 if we are using a compiler that doesn't implement them.
This lets us use the macros easily in standard headers (e.g. stdatomic.h, which
should be the subject of my next commit).
Approved by: dim (mentor)
Diffstat (limited to 'sys/sys')
-rw-r--r-- | sys/sys/cdefs.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 8e2e451..35be1a3 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -617,4 +617,14 @@ #endif #endif +#ifndef __has_feature +#define __has_feature(x) 0 +#endif +#ifndef __has_include +#define __has_include(x) 0 +#endif +#ifndef __has_builtin +#define __has_builtin(x) 0 +#endif + #endif /* !_SYS_CDEFS_H_ */ |