diff options
author | Nick Kralevich <nnk@google.com> | 2013-06-18 10:46:02 -0700 |
---|---|---|
committer | Nick Kralevich <nnk@google.com> | 2013-06-18 12:13:52 -0700 |
commit | b24c0637d06fe0980b9e13a8d0c3e6f4dbda9cd5 (patch) | |
tree | 918218d294c845db4b5fda6f9fb9a211a443bb54 /libc/include/sys/cdefs.h | |
parent | 977a33137d2be0093f474055f839cf665b82b588 (diff) | |
download | android_bionic-b24c0637d06fe0980b9e13a8d0c3e6f4dbda9cd5.tar.gz android_bionic-b24c0637d06fe0980b9e13a8d0c3e6f4dbda9cd5.tar.bz2 android_bionic-b24c0637d06fe0980b9e13a8d0c3e6f4dbda9cd5.zip |
libc: Introduce __errordecl()
Define __errordecl and replace __attribute__((__error__("foo")))
with __errordecl. Make sure __errordecl is a no-op on clang, as it
generates a compile time warning.
Change-Id: Ifa1a2d3afd6881de9d479fc2adac6737871a2949
Diffstat (limited to 'libc/include/sys/cdefs.h')
-rw-r--r-- | libc/include/sys/cdefs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h index c71035633..78513e313 100644 --- a/libc/include/sys/cdefs.h +++ b/libc/include/sys/cdefs.h @@ -330,6 +330,12 @@ #define __wur #endif +#if __GNUC_PREREQ__(4, 3) +#define __errordecl(name, msg) extern void name(void) __attribute__((__error__(msg))) +#else +#define __errordecl(name, msg) extern void name(void) +#endif + /* * Macros for manipulating "link sets". Link sets are arrays of pointers * to objects, which are gathered up by the linker. |