summaryrefslogtreecommitdiffstats
path: root/clang/lib/Headers/tgmath.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Headers/tgmath.h')
-rw-r--r--clang/lib/Headers/tgmath.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/Headers/tgmath.h b/clang/lib/Headers/tgmath.h
index 318e1185fee..0b8b5ce277c 100644
--- a/clang/lib/Headers/tgmath.h
+++ b/clang/lib/Headers/tgmath.h
@@ -25,6 +25,14 @@
#ifndef __TGMATH_H
#define __TGMATH_H
+/*
+ * Allow additional definitions and implementation-defined values on Apple
+ * platforms.
+ */
+#if defined(__APPLE__) && __STDC_HOSTED__ && __has_include_next(<tgmath.h>)
+# include_next <tgmath.h>
+#else
+
/* C99 7.22 Type-generic math <tgmath.h>. */
#include <math.h>
@@ -1371,4 +1379,5 @@ static long double
#undef _TG_ATTRS
#endif /* __cplusplus */
+#endif /* __has_include_next */
#endif /* __TGMATH_H */
OpenPOWER on IntegriCloud