forked from OSchip/llvm-project
Teach Clang's <float.h> to also include MinGW's <float.h>, which provides additional system definitions, from Ruben Van Boxem
llvm-svn: 134407
This commit is contained in:
parent
c750b6c436
commit
c9c40ce861
|
@ -24,6 +24,48 @@
|
||||||
#ifndef __FLOAT_H
|
#ifndef __FLOAT_H
|
||||||
#define __FLOAT_H
|
#define __FLOAT_H
|
||||||
|
|
||||||
|
/* If we're on MinGW, fall baack to the system's float.h, which might have
|
||||||
|
* additional definitions provided for Windows.
|
||||||
|
* For more details see http://msdn.microsoft.com/en-us/library/y0ybw9fy.aspx
|
||||||
|
*/
|
||||||
|
#if defined(__MINGW32__) && \
|
||||||
|
defined(__has_include_next) && __has_include_next(<float.h>)
|
||||||
|
# include_next <float.h>
|
||||||
|
|
||||||
|
/* Undefine anything that we'll be redefining below. */
|
||||||
|
# undef FLT_EVAL_METHOD
|
||||||
|
# undef FLT_ROUNDS
|
||||||
|
# undef FLT_RADIX
|
||||||
|
# undef FLT_MANT_DIG
|
||||||
|
# undef DBL_MANT_DIG
|
||||||
|
# undef LDBL_MANT_DIG
|
||||||
|
# undef DECIMAL_DIG
|
||||||
|
# undef FLT_DIG
|
||||||
|
# undef DBL_DIG
|
||||||
|
# undef LDBL_DIG
|
||||||
|
# undef FLT_MIN_EXP
|
||||||
|
# undef DBL_MIN_EXP
|
||||||
|
# undef LDBL_MIN_EXP
|
||||||
|
# undef FLT_MIN_10_EXP
|
||||||
|
# undef DBL_MIN_10_EXP
|
||||||
|
# undef LDBL_MIN_10_EXP
|
||||||
|
# undef FLT_MAX_EXP
|
||||||
|
# undef DBL_MAX_EXP
|
||||||
|
# undef LDBL_MAX_EXP
|
||||||
|
# undef FLT_MAX_10_EXP
|
||||||
|
# undef DBL_MAX_10_EXP
|
||||||
|
# undef LDBL_MAX_10_EXP
|
||||||
|
# undef FLT_MAX
|
||||||
|
# undef DBL_MAX
|
||||||
|
# undef LDBL_MAX
|
||||||
|
# undef FLT_EPSILON
|
||||||
|
# undef DBL_EPSILON
|
||||||
|
# undef LDBL_EPSILON
|
||||||
|
# undef FLT_MIN
|
||||||
|
# undef DBL_MIN
|
||||||
|
# undef LDBL_MIN
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Characteristics of floating point types, C99 5.2.4.2.2 */
|
/* Characteristics of floating point types, C99 5.2.4.2.2 */
|
||||||
|
|
||||||
#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
|
#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
|
||||||
|
|
Loading…
Reference in New Issue