Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 1 | // -*- C++ -*- |
Richard Smith | db9354d | 2015-10-08 21:17:21 +0000 | [diff] [blame] | 2 | //===---------------------------- cfenv -----------------------------------===// |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 3 | // |
Chandler Carruth | d201210 | 2019-01-19 10:56:40 +0000 | [diff] [blame] | 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 |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #ifndef _LIBCPP_CFENV |
| 11 | #define _LIBCPP_CFENV |
| 12 | |
| 13 | /* |
| 14 | cfenv synopsis |
| 15 | |
| 16 | This entire header is C99 / C++0X |
| 17 | |
| 18 | Macros: |
| 19 | |
| 20 | FE_DIVBYZERO |
| 21 | FE_INEXACT |
| 22 | FE_INVALID |
| 23 | FE_OVERFLOW |
| 24 | FE_UNDERFLOW |
| 25 | FE_ALL_EXCEPT |
| 26 | FE_DOWNWARD |
| 27 | FE_TONEAREST |
| 28 | FE_TOWARDZERO |
| 29 | FE_UPWARD |
| 30 | FE_DFL_ENV |
| 31 | |
| 32 | namespace std |
| 33 | { |
| 34 | |
| 35 | Types: |
| 36 | |
| 37 | fenv_t |
| 38 | fexcept_t |
| 39 | |
| 40 | int feclearexcept(int excepts); |
| 41 | int fegetexceptflag(fexcept_t* flagp, int excepts); |
| 42 | int feraiseexcept(int excepts); |
| 43 | int fesetexceptflag(const fexcept_t* flagp, int excepts); |
| 44 | int fetestexcept(int excepts); |
| 45 | int fegetround(); |
| 46 | int fesetround(int round); |
| 47 | int fegetenv(fenv_t* envp); |
| 48 | int feholdexcept(fenv_t* envp); |
| 49 | int fesetenv(const fenv_t* envp); |
| 50 | int feupdateenv(const fenv_t* envp); |
| 51 | |
| 52 | } // std |
| 53 | */ |
| 54 | |
| 55 | #include <__config> |
| 56 | #include <fenv.h> |
| 57 | |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 58 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 59 | #pragma GCC system_header |
Howard Hinnant | aaaa52b | 2011-10-17 20:05:10 +0000 | [diff] [blame] | 60 | #endif |
Howard Hinnant | c51e102 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 61 | |
| 62 | _LIBCPP_BEGIN_NAMESPACE_STD |
| 63 | |
| 64 | using ::fenv_t; |
| 65 | using ::fexcept_t; |
| 66 | |
| 67 | using ::feclearexcept; |
| 68 | using ::fegetexceptflag; |
| 69 | using ::feraiseexcept; |
| 70 | using ::fesetexceptflag; |
| 71 | using ::fetestexcept; |
| 72 | using ::fegetround; |
| 73 | using ::fesetround; |
| 74 | using ::fegetenv; |
| 75 | using ::feholdexcept; |
| 76 | using ::fesetenv; |
| 77 | using ::feupdateenv; |
| 78 | |
| 79 | _LIBCPP_END_NAMESPACE_STD |
| 80 | |
| 81 | #endif // _LIBCPP_CFENV |