Skip to content

Commit 27ad069

Browse files
committed
Auto merge of #2767 - carbotaniuman:patch-1, r=Amanieu
Add `stpcpy`, `stpncpy`, and `strtok_r` to unix These are POSIX 2008 extensions to the C standard.
2 parents d747e7d + 3d7f89f commit 27ad069

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/unix/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,8 @@ extern "C" {
515515

516516
pub fn strcpy(dst: *mut c_char, src: *const c_char) -> *mut c_char;
517517
pub fn strncpy(dst: *mut c_char, src: *const c_char, n: size_t) -> *mut c_char;
518+
pub fn stpcpy(dst: *mut c_char, src: *const c_char) -> *mut c_char;
519+
pub fn stpncpy(dst: *mut c_char, src: *const c_char, n: size_t) -> *mut c_char;
518520
pub fn strcat(s: *mut c_char, ct: *const c_char) -> *mut c_char;
519521
pub fn strncat(s: *mut c_char, ct: *const c_char, n: size_t) -> *mut c_char;
520522
pub fn strcmp(cs: *const c_char, ct: *const c_char) -> c_int;
@@ -538,6 +540,7 @@ extern "C" {
538540
)]
539541
pub fn strerror(n: c_int) -> *mut c_char;
540542
pub fn strtok(s: *mut c_char, t: *const c_char) -> *mut c_char;
543+
pub fn strtok_r(s: *mut c_char, t: *const c_char, p: *mut *mut c_char) -> *mut c_char;
541544
pub fn strxfrm(s: *mut c_char, ct: *const c_char, n: size_t) -> size_t;
542545
pub fn strsignal(sig: c_int) -> *mut c_char;
543546
pub fn wcslen(buf: *const wchar_t) -> size_t;

0 commit comments

Comments
 (0)