cfenv 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. // -*- C++ -*-
  2. //===---------------------------- cfenv -----------------------------------===//
  3. //
  4. // The LLVM Compiler Infrastructure
  5. //
  6. // This file is dual licensed under the MIT and the University of Illinois Open
  7. // Source Licenses. See LICENSE.TXT for details.
  8. //
  9. //===----------------------------------------------------------------------===//
  10. #ifndef _LIBCPP_CFENV
  11. #define _LIBCPP_CFENV
  12. /*
  13. cfenv synopsis
  14. This entire header is C99 / C++0X
  15. Macros:
  16. FE_DIVBYZERO
  17. FE_INEXACT
  18. FE_INVALID
  19. FE_OVERFLOW
  20. FE_UNDERFLOW
  21. FE_ALL_EXCEPT
  22. FE_DOWNWARD
  23. FE_TONEAREST
  24. FE_TOWARDZERO
  25. FE_UPWARD
  26. FE_DFL_ENV
  27. namespace std
  28. {
  29. Types:
  30. fenv_t
  31. fexcept_t
  32. int feclearexcept(int excepts);
  33. int fegetexceptflag(fexcept_t* flagp, int excepts);
  34. int feraiseexcept(int excepts);
  35. int fesetexceptflag(const fexcept_t* flagp, int excepts);
  36. int fetestexcept(int excepts);
  37. int fegetround();
  38. int fesetround(int round);
  39. int fegetenv(fenv_t* envp);
  40. int feholdexcept(fenv_t* envp);
  41. int fesetenv(const fenv_t* envp);
  42. int feupdateenv(const fenv_t* envp);
  43. } // std
  44. */
  45. // Not supported in SGX.
  46. #include <__config>
  47. #if !defined(_LIBCPP_SGX_CONFIG)
  48. #include <fenv.h>
  49. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  50. #pragma GCC system_header
  51. #endif
  52. _LIBCPP_BEGIN_NAMESPACE_STD
  53. using ::fenv_t;
  54. using ::fexcept_t;
  55. using ::feclearexcept;
  56. using ::fegetexceptflag;
  57. using ::feraiseexcept;
  58. using ::fesetexceptflag;
  59. using ::fetestexcept;
  60. using ::fegetround;
  61. using ::fesetround;
  62. using ::fegetenv;
  63. using ::feholdexcept;
  64. using ::fesetenv;
  65. using ::feupdateenv;
  66. _LIBCPP_END_NAMESPACE_STD
  67. #endif // !defined(_LIBCPP_SGX_CONFIG)
  68. #endif // _LIBCPP_CFENV