Skip to content

Commit aa74435

Browse files
committed
Add QCMD() for available platforms
1 parent 3520512 commit aa74435

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

src/unix/bsd/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,10 @@ f! {
360360
pub fn WCOREDUMP(status: ::c_int) -> bool {
361361
(status & 0o200) != 0
362362
}
363+
364+
pub fn QCMD(cmd: ::c_int, type_: ::c_int) -> ::c_int {
365+
(cmd << 8) | (type_ & 0x00ff)
366+
}
363367
}
364368

365369
extern {

src/unix/notbsd/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,10 @@ f! {
856856
pub fn WCOREDUMP(status: ::c_int) -> bool {
857857
(status & 0x80) != 0
858858
}
859+
860+
pub fn QCMD(cmd: ::c_int, type_: ::c_int) -> ::c_int {
861+
(cmd << 8) | (type_ & 0x00ff)
862+
}
859863
}
860864

861865
extern {

src/unix/uclibc/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,6 +1419,10 @@ f! {
14191419
pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool {
14201420
set1.bits == set2.bits
14211421
}
1422+
1423+
pub fn QCMD(cmd: ::c_int, type_: ::c_int) -> ::c_int {
1424+
(cmd << 8) | (type_ & 0x00ff)
1425+
}
14221426
}
14231427

14241428
extern {

0 commit comments

Comments
 (0)