summaryrefslogtreecommitdiff
path: root/src/fuchsia
diff options
context:
space:
mode:
authorHans Christian Schmitz <hcsch@hcsch.eu>2021-08-22 17:55:13 +0200
committerHans Christian Schmitz <hcsch@hcsch.eu>2021-08-22 18:06:46 +0200
commitf0dd7a93e9b7f45382dc6d96e9308881a0874ff0 (patch)
tree941b2e2d35617c8dfa94cf8c7b7fbfe00aaeca2e /src/fuchsia
parent865c9fa9f50922d70c2ce4cd2ffefa5be3733642 (diff)
downloadrust-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.rs1
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;