summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2017-08-01 22:10:36 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2017-08-01 22:10:36 +0000
commitd89a1eb4fbd11e23cb01971199e6ba0b0717ddeb (patch)
tree7caf930c753da553eba60a2e5ebad461d3732aa9
parent032d2381bf47778b6e6b2058b825a678fb58082d (diff)
downloadbcm5719-llvm-d89a1eb4fbd11e23cb01971199e6ba0b0717ddeb.tar.gz
bcm5719-llvm-d89a1eb4fbd11e23cb01971199e6ba0b0717ddeb.zip
[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 llvm-svn: 309752
-rw-r--r--clang/lib/Headers/float.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/Headers/float.h b/clang/lib/Headers/float.h
index 0f453d87cbc..502143d4e48 100644
--- a/clang/lib/Headers/float.h
+++ b/clang/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. */
OpenPOWER on IntegriCloud