diff options
author | bors <bors@rust-lang.org> | 2021-05-30 22:53:36 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2021-05-30 22:53:36 +0000 |
commit | 2bb07426aef98be3dc8c1a9a216796917c3abf0e (patch) | |
tree | c79ed5d5f2e0211d8f896f4ba46b02a776aa8902 /src/unix | |
parent | aee7c7913c95b2d925ec864fefd97968a447fc3e (diff) | |
parent | a4b11eb5d76f1786bf804edbe0cd91d98d60d923 (diff) | |
download | rust-libc-2bb07426aef98be3dc8c1a9a216796917c3abf0e.tar.gz |
Auto merge of #2202 - devnexen:netbsd_libutil_emalloc, r=JohnTitor
netbsd add error check functions from libutil and error handler.
Diffstat (limited to 'src/unix')
-rw-r--r-- | src/unix/bsd/netbsdlike/netbsd/mod.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs index b21ae3fc52..380062be92 100644 --- a/src/unix/bsd/netbsdlike/netbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs @@ -2149,6 +2149,20 @@ extern "C" { pub fn setutent(); pub fn endutent(); pub fn getutent() -> *mut utmp; + + pub fn efopen(p: *const ::c_char, m: *const ::c_char) -> ::FILE; + 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 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 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( + cb: ::Option<unsafe extern "C" fn(::c_int, *const ::c_char, ...)>, + ) -> ::Option<unsafe extern "C" fn(::c_int, *const ::c_char, ...)>; } cfg_if! { |