Skip to content

Commit

Permalink
Auto merge of #2296 - devnexen:netbsd_strspct, r=JohnTitor
Browse files Browse the repository at this point in the history
netbsd add strpct api.
  • Loading branch information
bors committed Jul 23, 2021
2 parents 805bb23 + 1163228 commit b6e0cbe
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
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
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 b6e0cbe

Please sign in to comment.