Skip to content

Commit

Permalink
netbsd add strpct api.
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Jul 22, 2021
1 parent 122f95d commit 1163228
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libc-test/semver/netbsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,9 @@ strcasecmp
strcasestr
strncasecmp
strndup
strpct
strsignal
strspct
sync
syscall
sysctl
Expand Down
15 changes: 15 additions & 0 deletions src/unix/bsd/netbsdlike/netbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2279,6 +2279,21 @@ extern "C" {
buflen: ::size_t,
spec: *const ::c_char,
) -> *const ::c_char;

pub fn strpct(
buf: *mut ::c_char,
bufsiz: ::size_t,
numerator: ::uintmax_t,
denominator: ::uintmax_t,
precision: ::size_t,
) -> *mut ::c_char;
pub fn strspct(
buf: *mut ::c_char,
bufsiz: ::size_t,
numerator: ::intmax_t,
denominator: ::intmax_t,
precision: ::size_t,
) -> *mut ::c_char;
}

cfg_if! {
Expand Down

0 comments on commit 1163228

Please sign in to comment.