0.3.0: converge relibc to upstream 0.6.0 + Red Bear patches
This commit is contained in:
@@ -1,16 +1,19 @@
|
||||
//! float.h implementation for Redox, following
|
||||
//! http://pubs.opengroup.org/onlinepubs/7908799/xsh/float.h.html
|
||||
//! `float.h` implementation.
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/float.h.html>.
|
||||
|
||||
use crate::{
|
||||
header::_fenv::{fegetround, FE_TONEAREST},
|
||||
platform::types::*,
|
||||
header::_fenv::{FE_TONEAREST, fegetround},
|
||||
platform::types::c_int,
|
||||
};
|
||||
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/float.h.html>.
|
||||
pub const FLT_RADIX: c_int = 2;
|
||||
|
||||
#[no_mangle]
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/float.h.html>.
|
||||
#[unsafe(no_mangle)]
|
||||
pub unsafe extern "C" fn flt_rounds() -> c_int {
|
||||
match fegetround() {
|
||||
match unsafe { fegetround() } {
|
||||
FE_TONEAREST => 1,
|
||||
_ => -1,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user