diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2015-12-06 17:59:04 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2015-12-09 07:50:59 +0100 |
commit | 75cb2a2b2501e022b94d16d3db2b0e9da1979388 (patch) | |
tree | 8f26f046ce8e2dde32918b1ea3e754aa2230e87c /include/sys/cdefs.h | |
parent | 8e43a1a143b506e391ba5ba988d1d0e88ce9364f (diff) |
Define __attribute_const__
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
Diffstat (limited to 'include/sys/cdefs.h')
-rw-r--r-- | include/sys/cdefs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h index 4da981f9a..f725ce98c 100644 --- a/include/sys/cdefs.h +++ b/include/sys/cdefs.h @@ -231,6 +231,12 @@ # define __attribute_pure__ /* Ignore */ #endif +#if __GNUC_PREREQ (2,96) +# define __attribute_const__ __attribute__((__const__)) +#else +# define __attribute_const__ /* unimplemented */ +#endif + /* At some point during the gcc 3.1 development the `used' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ |