]> granicus.if.org Git - clang/commitdiff
[Headers][Darwin] Allow #include_next<float.h> to work on Darwin prior to 10.7
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Tue, 1 Aug 2017 22:10:36 +0000 (22:10 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Tue, 1 Aug 2017 22:10:36 +0000 (22:10 +0000)
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/trunk@309752 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Headers/float.h

index 0f453d87cbcbddc7ca538c215c84031c49d2b752..502143d4e4813bbfb3d23646cbc70a7bbba33b9b 100644 (file)
  */
 #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. */