Skip to content

Commit

Permalink
Auto merge of #2767 - carbotaniuman:patch-1, r=Amanieu
Browse files Browse the repository at this point in the history
Add `stpcpy`, `stpncpy`, and `strtok_r` to unix

These are POSIX 2008 extensions to the C standard.
  • Loading branch information
bors committed Apr 28, 2022
2 parents d747e7d + 3d7f89f commit 27ad069
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/unix/mod.rs
Expand Up @@ -515,6 +515,8 @@ extern "C" {

pub fn strcpy(dst: *mut c_char, src: *const c_char) -> *mut c_char;
pub fn strncpy(dst: *mut c_char, src: *const c_char, n: size_t) -> *mut c_char;
pub fn stpcpy(dst: *mut c_char, src: *const c_char) -> *mut c_char;
pub fn stpncpy(dst: *mut c_char, src: *const c_char, n: size_t) -> *mut c_char;
pub fn strcat(s: *mut c_char, ct: *const c_char) -> *mut c_char;
pub fn strncat(s: *mut c_char, ct: *const c_char, n: size_t) -> *mut c_char;
pub fn strcmp(cs: *const c_char, ct: *const c_char) -> c_int;
Expand All @@ -538,6 +540,7 @@ extern "C" {
)]
pub fn strerror(n: c_int) -> *mut c_char;
pub fn strtok(s: *mut c_char, t: *const c_char) -> *mut c_char;
pub fn strtok_r(s: *mut c_char, t: *const c_char, p: *mut *mut c_char) -> *mut c_char;
pub fn strxfrm(s: *mut c_char, ct: *const c_char, n: size_t) -> size_t;
pub fn strsignal(sig: c_int) -> *mut c_char;
pub fn wcslen(buf: *const wchar_t) -> size_t;
Expand Down

0 comments on commit 27ad069

Please sign in to comment.