Skip to content

Commit a4b11eb

Browse files
committed
netbsd add error check functions from libutil and error handler.
1 parent 9c4944a commit a4b11eb

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

libc-test/semver/netbsd.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,6 +1029,16 @@ dl_phdr_info
10291029
dqblk
10301030
dup3
10311031
duplocale
1032+
easprintf
1033+
efopen
1034+
emalloc
1035+
erealloc
1036+
esetfunc
1037+
estrdup
1038+
estrndup
1039+
estrlcat
1040+
estrlcpy
1041+
evasprintf
10321042
endgrent
10331043
endpwent
10341044
endservent

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2140,6 +2140,20 @@ extern "C" {
21402140
pub fn setutent();
21412141
pub fn endutent();
21422142
pub fn getutent() -> *mut utmp;
2143+
2144+
pub fn efopen(p: *const ::c_char, m: *const ::c_char) -> ::FILE;
2145+
pub fn emalloc(n: ::size_t) -> *mut ::c_void;
2146+
pub fn ecalloc(n: ::size_t, c: ::size_t) -> *mut ::c_void;
2147+
pub fn erealloc(p: *mut ::c_void, n: ::size_t) -> *mut ::c_void;
2148+
pub fn estrdup(s: *const ::c_char) -> *mut ::c_char;
2149+
pub fn estrndup(s: *const ::c_char, len: ::size_t) -> *mut ::c_char;
2150+
pub fn estrlcpy(dst: *mut ::c_char, src: *const ::c_char, len: ::size_t) -> ::size_t;
2151+
pub fn estrlcat(dst: *mut ::c_char, src: *const ::c_char, len: ::size_t) -> ::size_t;
2152+
pub fn easprintf(string: *mut *mut ::c_char, fmt: *const ::c_char, ...) -> ::c_int;
2153+
pub fn evasprintf(string: *mut *mut ::c_char, fmt: *const ::c_char, ...) -> ::c_int;
2154+
pub fn esetfunc(
2155+
cb: ::Option<unsafe extern "C" fn(::c_int, *const ::c_char, ...)>,
2156+
) -> ::Option<unsafe extern "C" fn(::c_int, *const ::c_char, ...)>;
21432157
}
21442158

21452159
cfg_if! {

0 commit comments

Comments
 (0)