From 28464f3b51e775dfc04afef071052a6075fd9e15 Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Fri, 23 Nov 2012 12:53:04 +0800 Subject: [PATCH] Check the presence of __STDC_VERSION__ in See http://code.google.com/p/android/issues/detail?id=14627 and bea05255de4372e7c2d41489b637338f59df9361 Change-Id: Ie990b7c1df91adab631634e6b68454e4c5bab19d --- ndk/platforms/android-9/include/sys/cdefs.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ndk/platforms/android-9/include/sys/cdefs.h b/ndk/platforms/android-9/include/sys/cdefs.h index 849e2b8c6..92035d428 100644 --- a/ndk/platforms/android-9/include/sys/cdefs.h +++ b/ndk/platforms/android-9/include/sys/cdefs.h @@ -79,7 +79,7 @@ #define ___STRING(x) __STRING(x) #define ___CONCAT(x,y) __CONCAT(x,y) -#if __STDC__ || defined(__cplusplus) +#if defined(__STDC__) || defined(__cplusplus) #define __P(protos) protos /* full-blown ANSI C */ #define __CONCAT(x,y) x ## y #define __STRING(x) #x @@ -213,7 +213,7 @@ * C99 defines the restrict type qualifier keyword, which was made available * in GCC 2.92. */ -#if __STDC_VERSION__ >= 199901L +#if defined(__STDC__VERSION__) && __STDC_VERSION__ >= 199901L #define __restrict restrict #else #if !__GNUC_PREREQ__(2, 92) @@ -225,7 +225,7 @@ * C99 defines __func__ predefined identifier, which was made available * in GCC 2.95. */ -#if !(__STDC_VERSION__ >= 199901L) +#if !defined(__STDC_VERSION__) || !(__STDC_VERSION__ >= 199901L) #if __GNUC_PREREQ__(2, 6) #define __func__ __PRETTY_FUNCTION__ #elif __GNUC_PREREQ__(2, 4) @@ -497,5 +497,6 @@ #endif #define __BIONIC__ 1 +#include #endif /* !_SYS_CDEFS_H_ */