diff options
Diffstat (limited to 'libc/include/llvm-libc-macros/math-macros.h')
-rw-r--r-- | libc/include/llvm-libc-macros/math-macros.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libc/include/llvm-libc-macros/math-macros.h b/libc/include/llvm-libc-macros/math-macros.h index 136670e..0a23647 100644 --- a/libc/include/llvm-libc-macros/math-macros.h +++ b/libc/include/llvm-libc-macros/math-macros.h @@ -9,6 +9,8 @@ #ifndef __LLVM_LIBC_MACROS_MATH_MACROS_H #define __LLVM_LIBC_MACROS_MATH_MACROS_H +#include "limits-macros.h" + #define MATH_ERRNO 1 #define MATH_ERREXCEPT 2 @@ -16,8 +18,11 @@ #define INFINITY __builtin_inf() #define NAN __builtin_nanf("") -#define FP_ILOGB0 (-__INT_MAX__ - 1) -#define FP_ILOGBNAN __INT_MAX__ +#define FP_ILOGB0 (-INT_MAX - 1) +#define FP_ILOGBNAN INT_MAX + +#define FP_LLOGB0 (-LONG_MAX - 1) +#define FP_LLOGBNAN LONG_MAX #define isfinite(x) __builtin_isfinite(x) #define isinf(x) __builtin_isinf(x) @@ -25,7 +30,7 @@ #ifdef __FAST_MATH__ #define math_errhandling 0 -#elif defined __NO_MATH_ERRNO__ +#elif defined(__NO_MATH_ERRNO__) #define math_errhandling (MATH_ERREXCEPT) #else #define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT) |