| Howard Hinnant | bc8d3f9 | 2010-05-11 19:42:16 | [diff] [blame] | 1 | // -*- C++ -*- | 
| Richard Smith | 4ccd90d | 2015-10-08 21:17:21 | [diff] [blame] | 2 | //===---------------------------- cfenv -----------------------------------===// | 
| Howard Hinnant | bc8d3f9 | 2010-05-11 19:42:16 | [diff] [blame] | 3 | // | 
| Howard Hinnant | f5256e1 | 2010-05-11 21:36:01 | [diff] [blame] | 4 | // The LLVM Compiler Infrastructure | 
| Howard Hinnant | bc8d3f9 | 2010-05-11 19:42:16 | [diff] [blame] | 5 | // | 
| Howard Hinnant | b64f8b0 | 2010-11-16 22:09:02 | [diff] [blame] | 6 | // This file is dual licensed under the MIT and the University of Illinois Open | 
|  | 7 | // Source Licenses. See LICENSE.TXT for details. | 
| Howard Hinnant | bc8d3f9 | 2010-05-11 19:42:16 | [diff] [blame] | 8 | // | 
|  | 9 | //===----------------------------------------------------------------------===// | 
|  | 10 |  | 
|  | 11 | #ifndef _LIBCPP_CFENV | 
|  | 12 | #define _LIBCPP_CFENV | 
|  | 13 |  | 
|  | 14 | /* | 
|  | 15 | cfenv 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 | namespace std | 
|  | 34 | { | 
|  | 35 |  | 
|  | 36 | Types: | 
|  | 37 |  | 
|  | 38 | fenv_t | 
|  | 39 | fexcept_t | 
|  | 40 |  | 
|  | 41 | int feclearexcept(int excepts); | 
|  | 42 | int fegetexceptflag(fexcept_t* flagp, int excepts); | 
|  | 43 | int feraiseexcept(int excepts); | 
|  | 44 | int fesetexceptflag(const fexcept_t* flagp, int excepts); | 
|  | 45 | int fetestexcept(int excepts); | 
|  | 46 | int fegetround(); | 
|  | 47 | int fesetround(int round); | 
|  | 48 | int fegetenv(fenv_t* envp); | 
|  | 49 | int feholdexcept(fenv_t* envp); | 
|  | 50 | int fesetenv(const fenv_t* envp); | 
|  | 51 | int feupdateenv(const fenv_t* envp); | 
|  | 52 |  | 
|  | 53 | } // std | 
|  | 54 | */ | 
|  | 55 |  | 
|  | 56 | #include <__config> | 
|  | 57 | #include <fenv.h> | 
|  | 58 |  | 
| Howard Hinnant | 08e1747 | 2011-10-17 20:05:10 | [diff] [blame] | 59 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) | 
| Howard Hinnant | bc8d3f9 | 2010-05-11 19:42:16 | [diff] [blame] | 60 | #pragma GCC system_header | 
| Howard Hinnant | 08e1747 | 2011-10-17 20:05:10 | [diff] [blame] | 61 | #endif | 
| Howard Hinnant | bc8d3f9 | 2010-05-11 19:42:16 | [diff] [blame] | 62 |  | 
|  | 63 | _LIBCPP_BEGIN_NAMESPACE_STD | 
|  | 64 |  | 
|  | 65 | using ::fenv_t; | 
|  | 66 | using ::fexcept_t; | 
|  | 67 |  | 
|  | 68 | using ::feclearexcept; | 
|  | 69 | using ::fegetexceptflag; | 
|  | 70 | using ::feraiseexcept; | 
|  | 71 | using ::fesetexceptflag; | 
|  | 72 | using ::fetestexcept; | 
|  | 73 | using ::fegetround; | 
|  | 74 | using ::fesetround; | 
|  | 75 | using ::fegetenv; | 
|  | 76 | using ::feholdexcept; | 
|  | 77 | using ::fesetenv; | 
|  | 78 | using ::feupdateenv; | 
|  | 79 |  | 
|  | 80 | _LIBCPP_END_NAMESPACE_STD | 
|  | 81 |  | 
|  | 82 | #endif // _LIBCPP_CFENV |