aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-cppbuiltin.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-cppbuiltin.c')
-rw-r--r--gcc/c-cppbuiltin.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/c-cppbuiltin.c b/gcc/c-cppbuiltin.c
index 8573b8c5a46..11b41277230 100644
--- a/gcc/c-cppbuiltin.c
+++ b/gcc/c-cppbuiltin.c
@@ -289,6 +289,21 @@ define__GNUC__ (void)
if (*v && *v != ' ' && *v != '-')
abort ();
+
+ /* APPLE LOCAL begin Apple version */
+ {
+ const char *vt = version_string;
+ while (*vt != 0 && *vt != '(')
+ vt++;
+ while (*vt != 0 && ! ISDIGIT (*vt))
+ vt++;
+ for (q = vt; *q != 0 && ISDIGIT (*q); q++)
+ ;
+ if (q == vt || *q != ')')
+ abort ();
+ builtin_define_with_value_n ("__APPLE_CC__", vt, q - vt);
+ }
+ /* APPLE LOCAL end Apple version */
}
/* Hook that registers front end and target-specific built-ins. */