summaryrefslogtreecommitdiff
path: root/src/vxworks/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-12-20 10:07:51 +0000
committerbors <bors@rust-lang.org>2022-12-20 10:07:51 +0000
commit07636f636d6c0aeb65dfd1c4b0565c1cb4bad6e5 (patch)
tree0453237525fba1fca255672e036d3621aa245d3e /src/vxworks/mod.rs
parent6a5c07f70603c7d28464a92964fc02c81d0c1e31 (diff)
parent6a58758d5f4198305191747c5c8b6af3c5057898 (diff)
downloadrust-libc-07636f636d6c0aeb65dfd1c4b0565c1cb4bad6e5.tar.gz
Auto merge of #3036 - LegionMammal978:iso-c-funcs, r=JohnTitor
Add missing string-to-number functions from ISO C These should be the observable API changes: - ISO C90 function `atol()` is added to all `fuchsia`, `unix`, `vxworks`, `wasi`, and `windows` targets. - ISO C90 function `atof()` is added to `android`, `redox`, and `vxworks`. - ISO C99 functions `atoll()`, `strtoll()`, and `strtoull()` are added to all `fuchsia`, `unix`, `vxworks`, `wasi`, and `windows` targets. Also, I wasn't exactly sure where to insert the new functions, so I just tried to place them near related functions.
Diffstat (limited to 'src/vxworks/mod.rs')
-rw-r--r--src/vxworks/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vxworks/mod.rs b/src/vxworks/mod.rs
index 2772d68d2f..6b705e8a22 100644
--- a/src/vxworks/mod.rs
+++ b/src/vxworks/mod.rs
@@ -1119,11 +1119,16 @@ extern "C" {
pub fn feof(stream: *mut FILE) -> c_int;
pub fn ferror(stream: *mut FILE) -> c_int;
pub fn perror(s: *const c_char);
+ pub fn atof(s: *const c_char) -> c_double;
pub fn atoi(s: *const c_char) -> c_int;
+ pub fn atol(s: *const c_char) -> c_long;
+ pub fn atoll(s: *const c_char) -> c_longlong;
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 strtoll(s: *const c_char, endp: *mut *mut c_char, base: c_int) -> c_longlong;
pub fn strtoul(s: *const c_char, endp: *mut *mut c_char, base: c_int) -> c_ulong;
+ pub fn strtoull(s: *const c_char, endp: *mut *mut c_char, base: c_int) -> c_ulonglong;
pub fn calloc(nobj: size_t, size: size_t) -> *mut c_void;
pub fn malloc(size: size_t) -> *mut c_void;
pub fn realloc(p: *mut c_void, size: size_t) -> *mut c_void;