Skip to content

Commit 403bdc8

Browse files
committed
Merge pull request #188 from alexcrichton/merge
Roll together a few PRs in the queue
2 parents 213a0f9 + afb1f1a commit 403bdc8

File tree

7 files changed

+20
-2
lines changed

7 files changed

+20
-2
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/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ pub const SA_NOCLDSTOP: ::c_int = 0x0008;
120120
pub const SA_NODEFER: ::c_int = 0x0010;
121121
pub const SA_NOCLDWAIT: ::c_int = 0x0020;
122122

123+
pub const SS_ONSTACK: ::c_int = 1;
124+
pub const SS_DISABLE: ::c_int = 4;
125+
123126
pub const SIGCHLD: ::c_int = 20;
124127
pub const SIGBUS: ::c_int = 10;
125128
pub const SIGUSR1: ::c_int = 30;

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: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ extern {
411411

412412
pub fn flock(fd: ::c_int, operation: ::c_int) -> ::c_int;
413413

414-
#[cfg_attr(arget_os = "netbsd", link_name = "__gettimeofday50")]
414+
#[cfg_attr(target_os = "netbsd", link_name = "__gettimeofday50")]
415415
pub fn gettimeofday(tp: *mut ::timeval,
416416
tz: *mut ::c_void) -> ::c_int;
417417

@@ -488,6 +488,7 @@ extern {
488488
link_name = "pthread_sigmask$UNIX2003")]
489489
pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t,
490490
oldset: *mut sigset_t) -> ::c_int;
491+
pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
491492

492493
// #[cfg_attr(target_os = "linux", link_name = "__xpg_strerror_r")]
493494
pub fn strerror_r(errnum: ::c_int, buf: *mut c_char,
@@ -678,6 +679,9 @@ extern {
678679
pub fn tcflow(fd: ::c_int, action: ::c_int) -> ::c_int;
679680
pub fn tcflush(fd: ::c_int, action: ::c_int) -> ::c_int;
680681
pub fn tcsendbreak(fd: ::c_int, duration: ::c_int) -> ::c_int;
682+
pub fn mkstemp(template: *mut ::c_char) -> ::c_int;
683+
pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int;
684+
pub fn mkdtemp(template: *mut ::c_char) -> *mut ::c_char;
681685
}
682686

683687
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! {

src/unix/notbsd/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,9 @@ pub const SA_RESETHAND: ::c_int = 0x80000000;
385385
pub const SA_RESTART: ::c_int = 0x10000000;
386386
pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
387387

388+
pub const SS_ONSTACK: ::c_int = 1;
389+
pub const SS_DISABLE: ::c_int = 2;
390+
388391
pub const PATH_MAX: ::c_int = 4096;
389392

390393
pub const FD_SETSIZE: usize = 1024;

src/unix/solaris/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,9 @@ pub const SA_NODEFER: ::c_int = 0x00000010;
281281
pub const SA_NOCLDWAIT: ::c_int = 0x00010000;
282282
pub const SA_NOCLDSTOP: ::c_int = 0x00020000;
283283

284+
pub const SS_ONSTACK: ::c_int = 1;
285+
pub const SS_DISABLE: ::c_int = 2;
286+
284287
pub const FIONBIO: ::c_int = 0x8004667e;
285288

286289
pub const SIGCHLD: ::c_int = 18;

0 commit comments

Comments
 (0)