Skip to content

Rust update : macro bitflags require a ';' #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 22, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/fcntl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@ mod consts {
const O_TMPFILE = 0o20000000,
const O_NDELAY = O_NONBLOCK.bits
}
)
);

bitflags!(
flags FdFlag: c_int {
const FD_CLOEXEC = 1
}
)
);
}

#[cfg(any(target_os = "macos", target_os = "ios"))]
Expand All @@ -180,11 +180,11 @@ mod consts {
const O_NDELAY = O_NONBLOCK.bits,
const O_FSYNC = O_SYNC.bits
}
)
);

bitflags!(
flags FdFlag: c_int {
const FD_CLOEXEC = 1
}
)
);
}
4 changes: 2 additions & 2 deletions src/mount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ bitflags!(
const MS_MGC_VAL = 0xC0ED0000,
const MS_MGC_MSK = 0xffff0000
}
)
);

bitflags!(
flags MntFlags: c_int {
const MNT_FORCE = 1 << 0,
const MNT_DETATCH = 1 << 1,
const MNT_EXPIRE = 1 << 2
}
)
);

mod ffi {
use libc::{c_char, c_int, c_void, c_ulong};
Expand Down
2 changes: 1 addition & 1 deletion src/sys/epoll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ bitflags!(
const EPOLLONESHOT = 1 << 30,
const EPOLLET = 1 << 31
}
)
);

impl fmt::Show for EpollEventKind {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
Expand Down
4 changes: 2 additions & 2 deletions src/sys/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ bitflags!(
const EV_EOF = 0x8000,
const EV_ERROR = 0x4000
}
)
);

impl fmt::Show for EventFlag {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
Expand Down Expand Up @@ -153,7 +153,7 @@ bitflags!(
const NOTE_TRACKERR = 0x00000002,
const NOTE_CHILD = 0x00000004
}
)
);

pub const EV_POLL: EventFlag = EV_FLAG0;
pub const EV_OOBAND: EventFlag = EV_FLAG1;
Expand Down
2 changes: 1 addition & 1 deletion src/sys/eventfd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ bitflags!(
const EFD_NONBLOCK = 0o0004000, // Since Linux 2.6.27
const EFD_SEMAPHORE = 0o0000001, // Since Linux 2.6.30
}
)
);

pub fn eventfd(initval: uint, flags: EventFdFlag) -> SysResult<Fd> {
type F = unsafe extern "C" fn(initval: c_uint, flags: c_int) -> c_int;
Expand Down
6 changes: 3 additions & 3 deletions src/sys/signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub mod signal {
const SA_RESTART = 0x10000000,
const SA_SIGINFO = 0x00000004,
}
)
);

pub const SIGTRAP: libc::c_int = 5;
pub const SIGIOT: libc::c_int = 6;
Expand Down Expand Up @@ -144,7 +144,7 @@ pub mod signal {
const SA_RESTART = 0x10000000,
const SA_SIGINFO = 0x00000008,
}
)
);

pub const SIGTRAP: libc::c_int = 5;
pub const SIGIOT: libc::c_int = 6;
Expand Down Expand Up @@ -214,7 +214,7 @@ pub mod signal {
const SA_RESTART = 0x0002,
const SA_SIGINFO = 0x0040,
}
)
);

pub const SIGTRAP: libc::c_int = 5;
pub const SIGIOT: libc::c_int = 6;
Expand Down
2 changes: 1 addition & 1 deletion src/sys/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ bitflags!(
const SOCK_NONBLOCK = 0o0004000,
const SOCK_CLOEXEC = 0o2000000
}
)
);

#[deriving(Copy)]
pub enum SockAddr {
Expand Down
2 changes: 1 addition & 1 deletion src/sys/stat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ bitflags!(
const S_IFIFO = 0o010000,
const S_IFSOCK = 0o140000
}
)
);

impl fmt::Show for SFlag {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion src/sys/wait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bitflags!(
flags WaitPidFlag: c_int {
const WNOHANG = 0x00000001,
}
)
);

#[deriving(Copy)]
pub enum WaitStatus {
Expand Down