Auto merge of #748 - Susurrus:QCMD, r=alexcrichton

Add QCMD() for available platforms

Exists where `Q_QUOTAON` also exists, so added it for those same platforms.
This commit is contained in:
bors 2017-08-30 04:15:37 +00:00
commit c17711e5fb
3 changed files with 12 additions and 0 deletions

View File

@ -360,6 +360,10 @@ f! {
pub fn WCOREDUMP(status: ::c_int) -> bool {
(status & 0o200) != 0
}
pub fn QCMD(cmd: ::c_int, type_: ::c_int) -> ::c_int {
(cmd << 8) | (type_ & 0x00ff)
}
}
extern {

View File

@ -856,6 +856,10 @@ f! {
pub fn WCOREDUMP(status: ::c_int) -> bool {
(status & 0x80) != 0
}
pub fn QCMD(cmd: ::c_int, type_: ::c_int) -> ::c_int {
(cmd << 8) | (type_ & 0x00ff)
}
}
extern {

View File

@ -1419,6 +1419,10 @@ f! {
pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool {
set1.bits == set2.bits
}
pub fn QCMD(cmd: ::c_int, type_: ::c_int) -> ::c_int {
(cmd << 8) | (type_ & 0x00ff)
}
}
extern {