]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/libcxx/include/fenv.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm-project / libcxx / include / fenv.h
1 // -*- C++ -*-
2 //===---------------------------- math.h ----------------------------------===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef _LIBCPP_FENV_H
11 #define _LIBCPP_FENV_H
12
13
14 /*
15     fenv.h synopsis
16
17 This entire header is C99 / C++0X
18
19 Macros:
20
21     FE_DIVBYZERO
22     FE_INEXACT
23     FE_INVALID
24     FE_OVERFLOW
25     FE_UNDERFLOW
26     FE_ALL_EXCEPT
27     FE_DOWNWARD
28     FE_TONEAREST
29     FE_TOWARDZERO
30     FE_UPWARD
31     FE_DFL_ENV
32
33 Types:
34
35     fenv_t
36     fexcept_t
37
38 int feclearexcept(int excepts);
39 int fegetexceptflag(fexcept_t* flagp, int excepts);
40 int feraiseexcept(int excepts);
41 int fesetexceptflag(const fexcept_t* flagp, int excepts);
42 int fetestexcept(int excepts);
43 int fegetround();
44 int fesetround(int round);
45 int fegetenv(fenv_t* envp);
46 int feholdexcept(fenv_t* envp);
47 int fesetenv(const fenv_t* envp);
48 int feupdateenv(const fenv_t* envp);
49
50
51 */
52
53 #include <__config>
54
55 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
56 #pragma GCC system_header
57 #endif
58
59 #include_next <fenv.h>
60
61 #ifdef __cplusplus
62
63 extern "C++" {
64
65 #ifdef feclearexcept
66 #undef feclearexcept
67 #endif
68
69 #ifdef fegetexceptflag
70 #undef fegetexceptflag
71 #endif
72
73
74 #ifdef feraiseexcept
75 #undef feraiseexcept
76 #endif
77
78 #ifdef fesetexceptflag
79 #undef fesetexceptflag
80 #endif
81
82
83 #ifdef fetestexcept
84 #undef fetestexcept
85 #endif
86
87 #ifdef fegetround
88 #undef fegetround
89 #endif
90
91 #ifdef fesetround
92 #undef fesetround
93 #endif
94
95 #ifdef fegetenv
96 #undef fegetenv
97 #endif
98
99 #ifdef feholdexcept
100 #undef feholdexcept
101 #endif
102
103
104 #ifdef fesetenv
105 #undef fesetenv
106 #endif
107
108 #ifdef feupdateenv
109 #undef feupdateenv
110 #endif
111
112 } // extern "C++"
113
114 #endif // defined(__cplusplus)
115
116 #endif // _LIBCPP_FENV_H