File tree Expand file tree Collapse file tree 3 files changed +24
-2
lines changed
Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 2727/* If we're on MinGW, fall back to the system's float.h, which might have
2828 * additional definitions provided for Windows.
2929 * For more details see http://msdn.microsoft.com/en-us/library/y0ybw9fy.aspx
30+ *
31+ * Also fall back on Darwin to allow additional definitions and
32+ * implementation-defined values.
3033 */
31- #if (defined(__MINGW32__ ) || defined(_MSC_VER )) && __STDC_HOSTED__ && \
32- __has_include_next (< float .h > )
34+ #if (defined(__APPLE__ ) || (defined( __MINGW32__ ) || defined(_MSC_VER ))) && \
35+ __STDC_HOSTED__ && __has_include_next (< float .h > )
3336# include_next < float .h >
3437
3538/* Undefine anything that we'll be redefining below. */
Original file line number Diff line number Diff line change 1+ #ifndef SYSFLOAT_H
2+ #define SYSFLOAT_H
3+
4+ #define FLT_HAS_SUBNORM 1
5+
6+ #endif /* SYSFLOAT_H */
Original file line number Diff line number Diff line change 1+ // REQUIRES: system-darwin
2+ // RUN: %clang -target x86_64-apple-darwin10 -fsyntax-only -std=c11 -isysroot %S/Inputs %s
3+ #include <float.h>
4+
5+ // Test the #include_next on float.h works on Darwin.
6+ #ifndef FLT_HAS_SUBNORM
7+ #error "FLT_HAS_SUBNORM not defined"
8+ #endif
9+
10+ // Test that definition from builtin are also present.
11+ #ifndef FLT_MAX
12+ #error "FLT_MAX not defined"
13+ #endif
You can’t perform that action at this time.
0 commit comments