diff options
author | Hans Christian Schmitz <hcsch@hcsch.eu> | 2021-08-22 17:55:13 +0200 |
---|---|---|
committer | Hans Christian Schmitz <hcsch@hcsch.eu> | 2021-08-22 18:06:46 +0200 |
commit | f0dd7a93e9b7f45382dc6d96e9308881a0874ff0 (patch) | |
tree | 941b2e2d35617c8dfa94cf8c7b7fbfe00aaeca2e /src/fuchsia | |
parent | 865c9fa9f50922d70c2ce4cd2ffefa5be3733642 (diff) | |
download | rust-libc-f0dd7a93e9b7f45382dc6d96e9308881a0874ff0.tar.gz |
Add `strtof` for all platforms that have `strtod`
All platforms that have `strtod` very likely also have `strtof`. Having
`strtof` allows for fuzzing of `hexf-parse::parse_hexf32` comparing
against `strtof`, which can't (easily) be done with `strtod`, due to
float rounding and over-/underflow behavior.
Diffstat (limited to 'src/fuchsia')
-rw-r--r-- | src/fuchsia/mod.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/fuchsia/mod.rs b/src/fuchsia/mod.rs index e7150eac37..237760429d 100644 --- a/src/fuchsia/mod.rs +++ b/src/fuchsia/mod.rs @@ -3394,6 +3394,7 @@ extern "C" { pub fn perror(s: *const c_char); pub fn atoi(s: *const c_char) -> c_int; pub fn strtod(s: *const c_char, endp: *mut *mut c_char) -> c_double; + pub fn strtof(s: *const c_char, endp: *mut *mut c_char) -> c_float; pub fn strtol(s: *const c_char, endp: *mut *mut c_char, base: c_int) -> c_long; pub fn strtoul(s: *const c_char, endp: *mut *mut c_char, base: c_int) -> c_ulong; pub fn calloc(nobj: size_t, size: size_t) -> *mut c_void; |