Skip to main content

relibc/header/_fenv/
mod.rs

1//! `fenv.h` implementation.
2//!
3//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fenv.h.html>.
4
5use crate::platform::types::{c_int, c_ulonglong};
6
7/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fenv.h.html>.
8pub const FE_ALL_EXCEPT: c_int = 0;
9/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fenv.h.html>.
10pub const FE_TONEAREST: c_int = 0;
11
12/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fenv.h.html>.
13pub type fexcept_t = c_ulonglong;
14
15/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fenv.h.html>.
16#[repr(C)]
17pub struct fenv_t {
18    pub cw: c_ulonglong,
19}
20
21/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/feclearexcept.html>.
22// #[unsafe(no_mangle)]
23pub unsafe extern "C" fn feclearexcept(excepts: c_int) -> c_int {
24    unimplemented!();
25}
26
27/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/fegetenv.html>.
28// #[unsafe(no_mangle)]
29pub unsafe extern "C" fn fegetenv(envp: *mut fenv_t) -> c_int {
30    unimplemented!();
31}
32
33/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/fegetexceptflag.html>.
34// #[unsafe(no_mangle)]
35pub unsafe extern "C" fn fegetexceptflag(flagp: *mut fexcept_t, excepts: c_int) -> c_int {
36    unimplemented!();
37}
38
39/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/fegetround.html>.
40// #[unsafe(no_mangle)]
41pub unsafe extern "C" fn fegetround() -> c_int {
42    FE_TONEAREST
43}
44
45/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/feholdexcept.html>.
46// #[unsafe(no_mangle)]
47pub unsafe extern "C" fn feholdexcept(envp: *mut fenv_t) -> c_int {
48    unimplemented!();
49}
50
51/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/feraiseexcept.html>.
52// #[unsafe(no_mangle)]
53pub unsafe extern "C" fn feraiseexcept(except: c_int) -> c_int {
54    unimplemented!();
55}
56
57/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/fesetenv.html>.
58// #[unsafe(no_mangle)]
59pub unsafe extern "C" fn fesetenv(envp: *const fenv_t) -> c_int {
60    unimplemented!();
61}
62
63/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/fesetexceptflag.html>.
64// #[unsafe(no_mangle)]
65pub unsafe extern "C" fn fesetexceptflag(flagp: *const fexcept_t, excepts: c_int) -> c_int {
66    unimplemented!();
67}
68
69/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/fegetround.html>.
70// #[unsafe(no_mangle)]
71pub unsafe extern "C" fn fesetround(round: c_int) -> c_int {
72    unimplemented!();
73}
74
75/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/fetestexcept.html>.
76// #[unsafe(no_mangle)]
77pub unsafe extern "C" fn fetestexcept(excepts: c_int) -> c_int {
78    unimplemented!();
79}
80
81/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/feupdateenv.html>.
82// #[unsafe(no_mangle)]
83pub unsafe extern "C" fn feupdateenv(envp: *const fenv_t) -> c_int {
84    unimplemented!();
85}