fenv.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. #include_next <fenv.h>
  46. #ifdef __cplusplus
  47. extern "C++" {
  48. #ifdef feclearexcept
  49. #undef feclearexcept
  50. #endif
  51. #ifdef fegetexceptflag
  52. #undef fegetexceptflag
  53. #endif
  54. #ifdef feraiseexcept
  55. #undef feraiseexcept
  56. #endif
  57. #ifdef fesetexceptflag
  58. #undef fesetexceptflag
  59. #endif
  60. #ifdef fetestexcept
  61. #undef fetestexcept
  62. #endif
  63. #ifdef fegetround
  64. #undef fegetround
  65. #endif
  66. #ifdef fesetround
  67. #undef fesetround
  68. #endif
  69. #ifdef fegetenv
  70. #undef fegetenv
  71. #endif
  72. #ifdef feholdexcept
  73. #undef feholdexcept
  74. #endif
  75. #ifdef fesetenv
  76. #undef fesetenv
  77. #endif
  78. #ifdef feupdateenv
  79. #undef feupdateenv
  80. #endif
  81. } // extern "C++"
  82. #endif // defined(__cplusplus)
  83. #endif // _LIBCPP_FENV_H