aboutsummaryrefslogtreecommitdiffstats
path: root/libc/include/sys/cdefs.h
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@android.com>2011-03-17 10:56:25 +0100
committerDavid 'Digit' Turner <digit@android.com>2011-03-22 14:22:32 +0100
commit8eda21baa54977e4d164a4174d06b6aa12115fb1 (patch)
tree3e82356d2091b24e520279d1095dba1bdedada4b /libc/include/sys/cdefs.h
parent5a6f593b6197b96f980d9d45f9a981ef8705caf4 (diff)
downloadandroid_bionic-8eda21baa54977e4d164a4174d06b6aa12115fb1.tar.gz
android_bionic-8eda21baa54977e4d164a4174d06b6aa12115fb1.tar.bz2
android_bionic-8eda21baa54977e4d164a4174d06b6aa12115fb1.zip
libc: <sys/cdefs.h>: Fix the use of __STDC_VERSION__ from C++
See http://code.google.com/p/android/issues/detail?id=14627 for context. Change-Id: Idb10b675667d0d6e64dcb1d382be11e45aa6f4c4
Diffstat (limited to 'libc/include/sys/cdefs.h')
-rw-r--r--libc/include/sys/cdefs.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h
index 9b6da3175..92035d428 100644
--- a/libc/include/sys/cdefs.h
+++ b/libc/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)