summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2017-08-01 23:32:23 +0000
committerHans Wennborg <hans@hanshq.net>2017-08-01 23:32:23 +0000
commit90047174d9c34dedc5ac750fcd1fe0d7c738491c (patch)
tree9806eec94263ef4d5d0c6d65bb3e938ac78c496d
parent888cdb53e0f71201556f7d19d59c6bc3a582baf2 (diff)
Merging r309752:
------------------------------------------------------------------------ r309752 | bruno | 2017-08-01 15:10:36 -0700 (Tue, 01 Aug 2017) | 6 lines [Headers][Darwin] Allow #include_next<float.h> to work on Darwin prior to 10.7 This fixes PR31504 and it's a follow up from adding #include_next<float.h> for Darwin in r289018. rdar://problem/29856682 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_50@309764 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Headers/float.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Headers/float.h b/lib/Headers/float.h
index 0f453d87cb..502143d4e4 100644
--- a/lib/Headers/float.h
+++ b/lib/Headers/float.h
@@ -33,6 +33,15 @@
*/
#if (defined(__APPLE__) || (defined(__MINGW32__) || defined(_MSC_VER))) && \
__STDC_HOSTED__ && __has_include_next(<float.h>)
+
+/* Prior to Apple's 10.7 SDK, float.h SDK header used to apply an extra level
+ * of #include_next<float.h> to keep Metrowerks compilers happy. Avoid this
+ * extra indirection.
+ */
+#ifdef __APPLE__
+#define _FLOAT_H_
+#endif
+
# include_next <float.h>
/* Undefine anything that we'll be redefining below. */