Skip to content

Commit 7248c9f

Browse files
authored
[libc] Adding FP_INT_* macro constants if missing in overlay mode. (#87880)
1 parent 5f7b133 commit 7248c9f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

libc/hdr/math_macros.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,27 @@
1717

1818
#include <math.h>
1919

20+
// Some older math.h header does not have FP_INT_* constants yet.
21+
#ifndef FP_INT_UPWARD
22+
#define FP_INT_UPWARD 0
23+
#endif // FP_INT_UPWARD
24+
25+
#ifndef FP_INT_DOWNWARD
26+
#define FP_INT_DOWNWARD 1
27+
#endif // FP_INT_DOWNWARD
28+
29+
#ifndef FP_INT_TOWARDZERO
30+
#define FP_INT_TOWARDZERO 2
31+
#endif // FP_INT_TOWARDZERO
32+
33+
#ifndef FP_INT_TONEARESTFROMZERO
34+
#define FP_INT_TONEARESTFROMZERO 3
35+
#endif // FP_INT_TONEARESTFROMZERO
36+
37+
#ifndef FP_INT_TONEAREST
38+
#define FP_INT_TONEAREST 4
39+
#endif // FP_INT_TONEAREST
40+
2041
#endif // LLVM_LIBC_FULL_BUILD
2142

2243
#endif // LLVM_LIBC_HDR_MATH_MACROS_H

0 commit comments

Comments
 (0)