summaryrefslogtreecommitdiffstats
path: root/libc
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@android.com>2011-03-30 16:38:29 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-03-30 16:38:29 -0700
commitf5da2df1265fe14141c45a86fc706da657be7ab6 (patch)
treefe5d8088a703d00141b1c7f8afd8944fc1f49505 /libc
parentbf90b57b442760b85a0af38792e6e2f8aa9e7826 (diff)
parentbfe04ea0e61c6905c1f6781097bddf07f843eb25 (diff)
downloadbionic-f5da2df1265fe14141c45a86fc706da657be7ab6.zip
bionic-f5da2df1265fe14141c45a86fc706da657be7ab6.tar.gz
bionic-f5da2df1265fe14141c45a86fc706da657be7ab6.tar.bz2
am bfe04ea0: am 8c6b848e: am 0e47a919: Merge "libc: <sys/cdefs.h>: Fix the use of __STDC_VERSION__ from C++"
* commit 'bfe04ea0e61c6905c1f6781097bddf07f843eb25': libc: <sys/cdefs.h>: Fix the use of __STDC_VERSION__ from C++
Diffstat (limited to 'libc')
-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 9b6da31..92035d4 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)