Skip to content

Commit 43148b5

Browse files
committed
Merge branch 'mkstemp' of https://github.com/kamalmarhubi/libc into merge
2 parents 1722806 + 511a780 commit 43148b5

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,8 @@ extern {
640640

641641
pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t,
642642
advise: ::c_int) -> ::c_int;
643-
643+
pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
644+
pub fn mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int;
644645
}
645646

646647
cfg_if! {

src/unix/bsd/openbsdlike/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,8 @@ extern {
389389
pub fn pthread_stackseg_np(thread: ::pthread_t,
390390
sinfo: *mut ::stack_t) -> ::c_int;
391391
pub fn memrchr(cx: *const ::c_void, c: ::c_int, n: ::size_t) -> *mut ::c_void;
392+
pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
393+
pub fn mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int;
392394
}
393395

394396
cfg_if! {

src/unix/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,9 @@ extern {
678678
pub fn tcflow(fd: ::c_int, action: ::c_int) -> ::c_int;
679679
pub fn tcflush(fd: ::c_int, action: ::c_int) -> ::c_int;
680680
pub fn tcsendbreak(fd: ::c_int, duration: ::c_int) -> ::c_int;
681+
pub fn mkstemp(template: *mut ::c_char) -> ::c_int;
682+
pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int;
683+
pub fn mkdtemp(template: *mut ::c_char) -> *mut ::c_char;
681684
}
682685

683686
cfg_if! {

src/unix/notbsd/linux/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,8 @@ extern {
540540
pub fn unshare(flags: ::c_int) -> ::c_int;
541541
pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
542542
pub fn setns(fd: ::c_int, nstype: ::c_int) -> ::c_int;
543+
pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
544+
pub fn mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int;
543545
}
544546

545547
cfg_if! {

0 commit comments

Comments
 (0)