fenv.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. // -*- C++ -*-
  2. //===----------------------------------------------------------------------===//
  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. #ifndef _LIBCPP_FENV_H
  10. #define _LIBCPP_FENV_H
  11. /*
  12. fenv.h synopsis
  13. This entire header is C99 / C++0X
  14. Macros:
  15. FE_DIVBYZERO
  16. FE_INEXACT
  17. FE_INVALID
  18. FE_OVERFLOW
  19. FE_UNDERFLOW
  20. FE_ALL_EXCEPT
  21. FE_DOWNWARD
  22. FE_TONEAREST
  23. FE_TOWARDZERO
  24. FE_UPWARD
  25. FE_DFL_ENV
  26. Types:
  27. fenv_t
  28. fexcept_t
  29. int feclearexcept(int excepts);
  30. int fegetexceptflag(fexcept_t* flagp, int excepts);
  31. int feraiseexcept(int excepts);
  32. int fesetexceptflag(const fexcept_t* flagp, int excepts);
  33. int fetestexcept(int excepts);
  34. int fegetround();
  35. int fesetround(int round);
  36. int fegetenv(fenv_t* envp);
  37. int feholdexcept(fenv_t* envp);
  38. int fesetenv(const fenv_t* envp);
  39. int feupdateenv(const fenv_t* envp);
  40. */
  41. #include <__config>
  42. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  43. # pragma GCC system_header
  44. #endif
  45. #if __has_include_next(<fenv.h>)
  46. # include_next <fenv.h>
  47. #endif
  48. #ifdef __cplusplus
  49. extern "C++" {
  50. #ifdef feclearexcept
  51. #undef feclearexcept
  52. #endif
  53. #ifdef fegetexceptflag
  54. #undef fegetexceptflag
  55. #endif
  56. #ifdef feraiseexcept
  57. #undef feraiseexcept
  58. #endif
  59. #ifdef fesetexceptflag
  60. #undef fesetexceptflag
  61. #endif
  62. #ifdef fetestexcept
  63. #undef fetestexcept
  64. #endif
  65. #ifdef fegetround
  66. #undef fegetround
  67. #endif
  68. #ifdef fesetround
  69. #undef fesetround
  70. #endif
  71. #ifdef fegetenv
  72. #undef fegetenv
  73. #endif
  74. #ifdef feholdexcept
  75. #undef feholdexcept
  76. #endif
  77. #ifdef fesetenv
  78. #undef fesetenv
  79. #endif
  80. #ifdef feupdateenv
  81. #undef feupdateenv
  82. #endif
  83. } // extern "C++"
  84. #endif // defined(__cplusplus)
  85. #endif // _LIBCPP_FENV_H