Skip to content

Commit 6e426f6

Browse files
committed
Use macros defined in limits-macros.h instead of compiler's predefined macros.
1 parent ae80dd1 commit 6e426f6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libc/include/llvm-libc-macros/math-macros.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@
1818
#define INFINITY __builtin_inf()
1919
#define NAN __builtin_nanf("")
2020

21-
#define FP_ILOGB0 (-__INT_MAX__ - 1)
22-
#define FP_ILOGBNAN __INT_MAX__
21+
#define FP_ILOGB0 (-INT_MAX - 1)
22+
#define FP_ILOGBNAN INT_MAX
2323

24-
#define FP_LLOGB0 (-__LONG_MAX__ - 1)
25-
#define FP_LLOGBNAN __LONG_MAX__
24+
#define FP_LLOGB0 (-LONG_MAX - 1)
25+
#define FP_LLOGBNAN LONG_MAX
2626

2727
#define isfinite(x) __builtin_isfinite(x)
2828
#define isinf(x) __builtin_isinf(x)
2929
#define isnan(x) __builtin_isnan(x)
3030

3131
#ifdef __FAST_MATH__
3232
#define math_errhandling 0
33-
#elif defined __NO_MATH_ERRNO__
33+
#elif defined(__NO_MATH_ERRNO__)
3434
#define math_errhandling (MATH_ERREXCEPT)
3535
#else
3636
#define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT)

0 commit comments

Comments
 (0)