diff options
author | Yabin Cui <yabinc@google.com> | 2015-02-17 12:39:39 -0800 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2015-02-17 14:14:45 -0800 |
commit | 4645c4f62df49d1ece5aabb7c9fa44ca34d30272 (patch) | |
tree | 49f40a240870fdbd7f481215b82217c95a5b9536 /libc/include/sys/cdefs.h | |
parent | fb48c68221afb1f9e7c63a15a20cca0857d1b9f9 (diff) | |
download | android_bionic-4645c4f62df49d1ece5aabb7c9fa44ca34d30272.tar.gz android_bionic-4645c4f62df49d1ece5aabb7c9fa44ca34d30272.tar.bz2 android_bionic-4645c4f62df49d1ece5aabb7c9fa44ca34d30272.zip |
Move use of __warnattr to __deprecated.
clang don't support warning attribute. Replacing warning attriubte with
deprecated attribute can achieve the same behavior whether compiled by
gcc or clang.
Bug: 19340053
Change-Id: I064432b81cf55212458edbc749eb72dc15a810fb
Diffstat (limited to 'libc/include/sys/cdefs.h')
-rw-r--r-- | libc/include/sys/cdefs.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h index 1d33895e9..17da393b0 100644 --- a/libc/include/sys/cdefs.h +++ b/libc/include/sys/cdefs.h @@ -334,12 +334,16 @@ #define __wur #endif +#if __GNUC_PREREQ(3, 2) +#define __deprecated(msg) __attribute__ ((deprecated(msg))) +#else +#define __deprecated(msg) +#endif + #if __GNUC_PREREQ(4, 3) #define __errorattr(msg) __attribute__((__error__(msg))) -#define __warnattr(msg) __attribute__((__warning__(msg))) #else #define __errorattr(msg) -#define __warnattr(msg) #endif #define __errordecl(name, msg) extern void name(void) __errorattr(msg) |