Skip to content

Commit 2bb0742

Browse files
committed
Auto merge of #2202 - devnexen:netbsd_libutil_emalloc, r=JohnTitor
netbsd add error check functions from libutil and error handler.
2 parents aee7c79 + a4b11eb commit 2bb0742

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
@@ -1038,6 +1038,16 @@ dl_phdr_info
10381038
dqblk
10391039
dup3
10401040
duplocale
1041+
easprintf
1042+
efopen
1043+
emalloc
1044+
erealloc
1045+
esetfunc
1046+
estrdup
1047+
estrndup
1048+
estrlcat
1049+
estrlcpy
1050+
evasprintf
10411051
endgrent
10421052
endpwent
10431053
endservent

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2149,6 +2149,20 @@ extern "C" {
21492149
pub fn setutent();
21502150
pub fn endutent();
21512151
pub fn getutent() -> *mut utmp;
2152+
2153+
pub fn efopen(p: *const ::c_char, m: *const ::c_char) -> ::FILE;
2154+
pub fn emalloc(n: ::size_t) -> *mut ::c_void;
2155+
pub fn ecalloc(n: ::size_t, c: ::size_t) -> *mut ::c_void;
2156+
pub fn erealloc(p: *mut ::c_void, n: ::size_t) -> *mut ::c_void;
2157+
pub fn estrdup(s: *const ::c_char) -> *mut ::c_char;
2158+
pub fn estrndup(s: *const ::c_char, len: ::size_t) -> *mut ::c_char;
2159+
pub fn estrlcpy(dst: *mut ::c_char, src: *const ::c_char, len: ::size_t) -> ::size_t;
2160+
pub fn estrlcat(dst: *mut ::c_char, src: *const ::c_char, len: ::size_t) -> ::size_t;
2161+
pub fn easprintf(string: *mut *mut ::c_char, fmt: *const ::c_char, ...) -> ::c_int;
2162+
pub fn evasprintf(string: *mut *mut ::c_char, fmt: *const ::c_char, ...) -> ::c_int;
2163+
pub fn esetfunc(
2164+
cb: ::Option<unsafe extern "C" fn(::c_int, *const ::c_char, ...)>,
2165+
) -> ::Option<unsafe extern "C" fn(::c_int, *const ::c_char, ...)>;
21522166
}
21532167

21542168
cfg_if! {

0 commit comments

Comments
 (0)