diff options
| author | bors <bors@rust-lang.org> | 2021-04-30 09:52:32 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-04-30 09:52:32 +0000 |
| commit | 49920bc581743d6edb9f82fbff4cbafebc212619 (patch) | |
| tree | 2849e16701ef5e6c51028f7e84c2d04b8ac14364 /library/std/src/sys/hermit | |
| parent | bcd696d722c04a0f8c34d884aa4ed2322f55cdd8 (diff) | |
| parent | 26fb1e373bd313b70d1f95cd16259035e5a7f8c8 (diff) | |
| download | rust-49920bc581743d6edb9f82fbff4cbafebc212619.tar.gz rust-49920bc581743d6edb9f82fbff4cbafebc212619.zip | |
Auto merge of #84522 - CDirkx:cmath, r=yaahc
Reuse `sys::unix::cmath` on other platforms Reuse `sys::unix::cmath` on all non-`windows` platforms. `unix` is chosen as the canonical location instead of `unsupported` or `common` because `unsupported` doesn't make sense semantically and `common` is reserved for code that is supported on all platforms. Also `unix` is already the home of some non-`windows` code that is technically not exclusive to `unix` like `unix::path`.
Diffstat (limited to 'library/std/src/sys/hermit')
| -rw-r--r-- | library/std/src/sys/hermit/cmath.rs | 29 | ||||
| -rw-r--r-- | library/std/src/sys/hermit/mod.rs | 1 |
2 files changed, 1 insertions, 29 deletions
diff --git a/library/std/src/sys/hermit/cmath.rs b/library/std/src/sys/hermit/cmath.rs deleted file mode 100644 index 304cf906b2a..00000000000 --- a/library/std/src/sys/hermit/cmath.rs +++ /dev/null @@ -1,29 +0,0 @@ -// These symbols are all defined in `compiler-builtins` -extern "C" { - pub fn acos(n: f64) -> f64; - pub fn acosf(n: f32) -> f32; - pub fn asin(n: f64) -> f64; - pub fn asinf(n: f32) -> f32; - pub fn atan(n: f64) -> f64; - pub fn atan2(a: f64, b: f64) -> f64; - pub fn atan2f(a: f32, b: f32) -> f32; - pub fn atanf(n: f32) -> f32; - pub fn cbrt(n: f64) -> f64; - pub fn cbrtf(n: f32) -> f32; - pub fn cosh(n: f64) -> f64; - pub fn coshf(n: f32) -> f32; - pub fn expm1(n: f64) -> f64; - pub fn expm1f(n: f32) -> f32; - pub fn fdim(a: f64, b: f64) -> f64; - pub fn fdimf(a: f32, b: f32) -> f32; - pub fn hypot(x: f64, y: f64) -> f64; - pub fn hypotf(x: f32, y: f32) -> f32; - pub fn log1p(n: f64) -> f64; - pub fn log1pf(n: f32) -> f32; - pub fn sinh(n: f64) -> f64; - pub fn sinhf(n: f32) -> f32; - pub fn tan(n: f64) -> f64; - pub fn tanf(n: f32) -> f32; - pub fn tanh(n: f64) -> f64; - pub fn tanhf(n: f32) -> f32; -} diff --git a/library/std/src/sys/hermit/mod.rs b/library/std/src/sys/hermit/mod.rs index 3364d215776..0c49a6fb6de 100644 --- a/library/std/src/sys/hermit/mod.rs +++ b/library/std/src/sys/hermit/mod.rs @@ -20,6 +20,7 @@ use crate::os::raw::c_char; pub mod alloc; pub mod args; +#[path = "../unix/cmath.rs"] pub mod cmath; pub mod condvar; pub mod env; |
