diff --git a/src/header/_fenv/cbindgen.toml b/src/header/_fenv/cbindgen.toml index 6b94e4d28e..c4fef18554 100644 --- a/src/header/_fenv/cbindgen.toml +++ b/src/header/_fenv/cbindgen.toml @@ -1,4 +1,12 @@ -sys_includes = ["stdint.h"] +# POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fenv.h.html +# +# There are no spec quotations relating to includes +# +# TODO figure out what type to use for `fenv_t` and `fexcept_t` +# currently using `c_ulonglong` as it doesn't bring in +# stdint.h (which would be considered namespace pollution) +# +# NOTE this header is not currently exported as we are using openlibm include_guard = "_RELIBC_FENV_H" language = "C" style = "Tag" diff --git a/src/header/_fenv/mod.rs b/src/header/_fenv/mod.rs index 54dd24062c..c09b2882a7 100644 --- a/src/header/_fenv/mod.rs +++ b/src/header/_fenv/mod.rs @@ -2,7 +2,7 @@ //! //! See . -use crate::platform::types::c_int; +use crate::platform::types::{c_int, c_ulonglong}; /// See . pub const FE_ALL_EXCEPT: c_int = 0; @@ -10,12 +10,12 @@ pub const FE_ALL_EXCEPT: c_int = 0; pub const FE_TONEAREST: c_int = 0; /// See . -pub type fexcept_t = u64; +pub type fexcept_t = c_ulonglong; /// See . #[repr(C)] pub struct fenv_t { - pub cw: u64, + pub cw: c_ulonglong, } /// See .