1//===-- Definition of macros from math.h ----------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_LIBC_HDR_MATH_MACROS_H
10#define LLVM_LIBC_HDR_MATH_MACROS_H
11
12#ifdef LIBC_FULL_BUILD
13
14#include "include/llvm-libc-macros/math-macros.h"
15
16#else // Overlay mode
17
18#include <math.h>
19
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
41#endif // LLVM_LIBC_FULL_BUILD
42
43#endif // LLVM_LIBC_HDR_MATH_MACROS_H
44

source code of libc/hdr/math_macros.h