diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2012-10-16 18:45:24 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2012-10-16 18:45:24 +0000 |
commit | 5eceb3958ee6cb42d57d4fe52dd76fb03b178edf (patch) | |
tree | fcddcedf0dc6b3aab54a8f7e85d619e574aa0e11 /newlib/libc/include/_ansi.h | |
parent | 71c13b96338eeb7021c211c1819cba700e85b61c (diff) | |
download | cygnal-5eceb3958ee6cb42d57d4fe52dd76fb03b178edf.tar.gz cygnal-5eceb3958ee6cb42d57d4fe52dd76fb03b178edf.tar.bz2 cygnal-5eceb3958ee6cb42d57d4fe52dd76fb03b178edf.zip |
* libc/include/sys/features.h (__GNUC_PREREQ): Define. Use
throughout in place of explicit GNUC version checks.
* libc/include/_ansi.h (_NOINLINE): Define.
(_NOINLINE_STATIC): Define.
* libc/stdio/vfprintf.c (__sbprintf): Define _NOINLINE_STATIC.
Diffstat (limited to 'newlib/libc/include/_ansi.h')
-rw-r--r-- | newlib/libc/include/_ansi.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/newlib/libc/include/_ansi.h b/newlib/libc/include/_ansi.h index 86cb82b35..c5597b30b 100644 --- a/newlib/libc/include/_ansi.h +++ b/newlib/libc/include/_ansi.h @@ -34,9 +34,7 @@ #define _BEGIN_STD_C extern "C" { #define _END_STD_C } #endif -#if defined(__GNUC__) && \ - ( (__GNUC__ >= 4) || \ - ( (__GNUC__ >= 3) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 3) ) ) +#if __GNUC_PREREQ (3, 3) #define _NOTHROW __attribute__ ((nothrow)) #else #define _NOTHROW throw() @@ -133,4 +131,14 @@ #define _ELIDABLE_INLINE static __inline__ #endif +#if __GNUC_PREREQ (3, 1) +#define _NOINLINE __attribute__ ((__noinline__)) +#define _NOINLINE_STATIC _NOINLINE static +#else +/* On non-GNU compilers and GCC prior to version 3.1 the compiler can't be + trusted not to inline if it is static. */ +#define _NOINLINE +#define _NOINLINE_STATIC +#endif + #endif /* _ANSIDECL_H_ */ |