std: move cmath into sys

This commit is contained in:
joboet 2024-01-18 20:33:29 +01:00
parent 6fff796eac
commit f88e64343e
No known key found for this signature in database
GPG Key ID: 704E0149B0194B3C
15 changed files with 14 additions and 26 deletions

View File

@ -1,5 +1,3 @@
#![cfg(not(test))]
// These symbols are all defined by `libm`,
// or by `compiler-builtins` on unsupported platforms.

View File

@ -0,0 +1,11 @@
#![cfg(not(test))]
cfg_if::cfg_if! {
if #[cfg(target_os = "windows")] {
mod windows;
pub use windows::*;
} else {
mod builtins;
pub use builtins::*;
}
}

View File

@ -1,5 +1,3 @@
#![cfg(not(test))]
use core::ffi::{c_double, c_float, c_int};
extern "C" {

View File

@ -3,9 +3,11 @@
/// descriptors.
mod pal;
pub mod os_str;
mod personality;
pub mod cmath;
pub mod os_str;
// FIXME(117276): remove this, move feature implementations into individual
// submodules.
pub use pal::*;

View File

@ -19,8 +19,6 @@ use crate::os::raw::c_char;
pub mod alloc;
pub mod args;
#[path = "../unix/cmath.rs"]
pub mod cmath;
pub mod env;
pub mod fd;
pub mod fs;

View File

@ -13,8 +13,6 @@ mod waitqueue;
pub mod alloc;
pub mod args;
#[path = "../unix/cmath.rs"]
pub mod cmath;
pub mod env;
pub mod fd;
#[path = "../unsupported/fs.rs"]

View File

@ -21,8 +21,6 @@ mod itron {
pub mod alloc;
#[path = "../unsupported/args.rs"]
pub mod args;
#[path = "../unix/cmath.rs"]
pub mod cmath;
pub mod env;
// `error` is `pub(crate)` so that it can be accessed by `itron/error.rs` as
// `crate::sys::error`

View File

@ -11,8 +11,6 @@ pub use self::rand::hashmap_random_keys;
pub mod alloc;
#[path = "../unsupported/args.rs"]
pub mod args;
#[path = "../unix/cmath.rs"]
pub mod cmath;
#[path = "../unsupported/env.rs"]
pub mod env;
pub mod locks;

View File

@ -14,8 +14,6 @@
pub mod alloc;
pub mod args;
#[path = "../unix/cmath.rs"]
pub mod cmath;
pub mod env;
#[path = "../unsupported/fs.rs"]
pub mod fs;

View File

@ -11,8 +11,6 @@ pub mod weak;
pub mod alloc;
pub mod android;
pub mod args;
#[path = "../unix/cmath.rs"]
pub mod cmath;
pub mod env;
pub mod fd;
pub mod fs;

View File

@ -2,8 +2,6 @@
pub mod alloc;
pub mod args;
#[path = "../unix/cmath.rs"]
pub mod cmath;
pub mod env;
pub mod fs;
pub mod io;

View File

@ -20,8 +20,6 @@ use crate::mem;
#[path = "../unix/alloc.rs"]
pub mod alloc;
pub mod args;
#[path = "../unix/cmath.rs"]
pub mod cmath;
pub mod env;
pub mod fd;
pub mod fs;

View File

@ -19,8 +19,6 @@
pub mod alloc;
#[path = "../unsupported/args.rs"]
pub mod args;
#[path = "../unix/cmath.rs"]
pub mod cmath;
pub mod env;
#[path = "../unsupported/fs.rs"]
pub mod fs;

View File

@ -15,7 +15,6 @@ pub mod compat;
pub mod alloc;
pub mod args;
pub mod c;
pub mod cmath;
pub mod env;
pub mod fs;
pub mod handle;

View File

@ -3,8 +3,6 @@
pub mod alloc;
#[path = "../unsupported/args.rs"]
pub mod args;
#[path = "../unix/cmath.rs"]
pub mod cmath;
#[path = "../unsupported/env.rs"]
pub mod env;
#[path = "../unsupported/fs.rs"]