From 5eceb3958ee6cb42d57d4fe52dd76fb03b178edf Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 16 Oct 2012 18:45:24 +0000 Subject: * 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. --- newlib/libc/include/sys/features.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'newlib/libc/include/sys') diff --git a/newlib/libc/include/sys/features.h b/newlib/libc/include/sys/features.h index e7f9c65dd..f150706db 100644 --- a/newlib/libc/include/sys/features.h +++ b/newlib/libc/include/sys/features.h @@ -25,6 +25,16 @@ extern "C" { #endif +/* Macro to test version of GCC. Returns 0 for non-GCC or too old GCC. */ +#ifndef __GNUC_PREREQ +# if defined __GNUC__ && defined __GNUC_MINOR__ +# define __GNUC_PREREQ(maj, min) \ + ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) +# else +# define __GNUC_PREREQ(maj, min) 0 +# endif +#endif /* __GNUC_PREREQ */ + /* RTEMS adheres to POSIX -- 1003.1b with some features from annexes. */ #ifdef __rtems__ -- cgit v1.2.3