From 6ff2d74cfb6b30a2c5659ce24d5d7039dffc6a9e Mon Sep 17 00:00:00 2001 From: David Carlier Date: Thu, 4 Nov 2021 17:04:44 +0000 Subject: [PATCH] netbsd libutil update --- libc-test/semver/netbsd.txt | 3 +++ src/unix/bsd/netbsdlike/netbsd/mod.rs | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/libc-test/semver/netbsd.txt b/libc-test/semver/netbsd.txt index a71097f8..b58ddd4e 100644 --- a/libc-test/semver/netbsd.txt +++ b/libc-test/semver/netbsd.txt @@ -1134,11 +1134,14 @@ easprintf efopen emalloc erealloc +ereallocarr esetfunc estrdup estrndup estrlcat estrlcpy +estrtoi +estrtou evasprintf endgrent endpwent diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs index c511fadc..678402f4 100644 --- a/src/unix/bsd/netbsdlike/netbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs @@ -2536,10 +2536,23 @@ extern "C" { pub fn emalloc(n: ::size_t) -> *mut ::c_void; pub fn ecalloc(n: ::size_t, c: ::size_t) -> *mut ::c_void; pub fn erealloc(p: *mut ::c_void, n: ::size_t) -> *mut ::c_void; + pub fn ereallocarr(p: *mut ::c_void, n: ::size_t, s: ::size_t); pub fn estrdup(s: *const ::c_char) -> *mut ::c_char; pub fn estrndup(s: *const ::c_char, len: ::size_t) -> *mut ::c_char; pub fn estrlcpy(dst: *mut ::c_char, src: *const ::c_char, len: ::size_t) -> ::size_t; pub fn estrlcat(dst: *mut ::c_char, src: *const ::c_char, len: ::size_t) -> ::size_t; + pub fn estrtoi( + nptr: *const ::c_char, + base: ::c_int, + lo: ::intmax_t, + hi: ::intmax_t, + ) -> ::intmax_t; + pub fn estrtou( + nptr: *const ::c_char, + base: ::c_int, + lo: ::uintmax_t, + hi: ::uintmax_t, + ) -> ::uintmax_t; pub fn easprintf(string: *mut *mut ::c_char, fmt: *const ::c_char, ...) -> ::c_int; pub fn evasprintf(string: *mut *mut ::c_char, fmt: *const ::c_char, ...) -> ::c_int; pub fn esetfunc(