Skip to content

Commit 32a347b

Browse files
committed
Bump bitflags to 0.7
1 parent f8d4c31 commit 32a347b

20 files changed

+53
-53
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ signalfd = []
2222

2323
[dependencies]
2424
libc = { git = "https://github.com/rust-lang/libc" }
25-
bitflags = "0.4"
25+
bitflags = "0.7"
2626
cfg-if = "0.1.0"
2727
void = "1.0.2"
2828

src/fcntl.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ mod consts {
138138
use libc::{self, c_int, c_uint};
139139

140140
bitflags! {
141-
flags SpliceFFlags: c_uint {
141+
pub flags SpliceFFlags: c_uint {
142142
const SPLICE_F_MOVE = libc::SPLICE_F_MOVE,
143143
const SPLICE_F_NONBLOCK = libc::SPLICE_F_NONBLOCK,
144144
const SPLICE_F_MORE = libc::SPLICE_F_MORE,
@@ -147,7 +147,7 @@ mod consts {
147147
}
148148

149149
bitflags!(
150-
flags OFlag: c_int {
150+
pub flags OFlag: c_int {
151151
const O_ACCMODE = 0o00000003,
152152
const O_RDONLY = 0o00000000,
153153
const O_WRONLY = 0o00000001,
@@ -173,13 +173,13 @@ mod consts {
173173
);
174174

175175
bitflags!(
176-
flags FdFlag: c_int {
176+
pub flags FdFlag: c_int {
177177
const FD_CLOEXEC = 1
178178
}
179179
);
180180

181181
bitflags!(
182-
flags SealFlag: c_int {
182+
pub flags SealFlag: c_int {
183183
const F_SEAL_SEAL = 1,
184184
const F_SEAL_SHRINK = 2,
185185
const F_SEAL_GROW = 4,
@@ -194,7 +194,7 @@ mod consts {
194194
use libc::c_int;
195195

196196
bitflags!(
197-
flags OFlag: c_int {
197+
pub flags OFlag: c_int {
198198
const O_ACCMODE = 0x0000003,
199199
const O_RDONLY = 0x0000000,
200200
const O_WRONLY = 0x0000001,
@@ -216,7 +216,7 @@ mod consts {
216216
);
217217

218218
bitflags!(
219-
flags FdFlag: c_int {
219+
pub flags FdFlag: c_int {
220220
const FD_CLOEXEC = 1
221221
}
222222
);
@@ -227,7 +227,7 @@ mod consts {
227227
use libc::c_int;
228228

229229
bitflags!(
230-
flags OFlag: c_int {
230+
pub flags OFlag: c_int {
231231
const O_ACCMODE = 0x0000003,
232232
const O_RDONLY = 0x0000000,
233233
const O_WRONLY = 0x0000001,
@@ -253,7 +253,7 @@ mod consts {
253253
);
254254

255255
bitflags!(
256-
flags FdFlag: c_int {
256+
pub flags FdFlag: c_int {
257257
const FD_CLOEXEC = 1
258258
}
259259
);
@@ -264,7 +264,7 @@ mod consts {
264264
use libc::c_int;
265265

266266
bitflags!(
267-
flags OFlag: c_int {
267+
pub flags OFlag: c_int {
268268
const O_ACCMODE = 0x0000003,
269269
const O_RDONLY = 0x0000000,
270270
const O_WRONLY = 0x0000001,
@@ -294,7 +294,7 @@ mod consts {
294294
);
295295

296296
bitflags!(
297-
flags FdFlag: c_int {
297+
pub flags FdFlag: c_int {
298298
const FD_CLOEXEC = 1
299299
}
300300
);
@@ -305,7 +305,7 @@ mod consts {
305305
use libc::c_int;
306306

307307
bitflags!(
308-
flags OFlag: c_int {
308+
pub flags OFlag: c_int {
309309
const O_ACCMODE = 0x0000003,
310310
const O_RDONLY = 0x0000000,
311311
const O_WRONLY = 0x0000001,
@@ -329,7 +329,7 @@ mod consts {
329329
);
330330

331331
bitflags!(
332-
flags FdFlag: c_int {
332+
pub flags FdFlag: c_int {
333333
const FD_CLOEXEC = 1
334334
}
335335
);

src/mount.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use libc;
33
use {Errno, Result, NixPath};
44

55
bitflags!(
6-
flags MsFlags: c_ulong {
6+
pub flags MsFlags: c_ulong {
77
const MS_RDONLY = 1 << 0, // Mount read-only
88
const MS_NOSUID = 1 << 1, // Ignore suid and sgid bits
99
const MS_NODEV = 1 << 2, // Disallow access to device special files
@@ -42,7 +42,7 @@ bitflags!(
4242
);
4343

4444
bitflags!(
45-
flags MntFlags: c_int {
45+
pub flags MntFlags: c_int {
4646
const MNT_FORCE = 1 << 0,
4747
const MNT_DETACH = 1 << 1,
4848
const MNT_EXPIRE = 1 << 2

src/mqueue.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use sys::stat::Mode;
1010
use std::mem;
1111

1212
libc_bitflags!{
13-
flags MQ_OFlag: libc::c_int {
13+
pub flags MQ_OFlag: libc::c_int {
1414
O_RDONLY,
1515
O_WRONLY,
1616
O_RDWR,
@@ -22,7 +22,7 @@ libc_bitflags!{
2222
}
2323

2424
libc_bitflags!{
25-
flags FdFlag: libc::c_int {
25+
pub flags FdFlag: libc::c_int {
2626
FD_CLOEXEC,
2727
}
2828
}

src/poll.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ impl PollFd {
2424
}
2525

2626
libc_bitflags! {
27-
flags EventFlags: libc::c_short {
27+
pub flags EventFlags: libc::c_short {
2828
POLLIN,
2929
POLLPRI,
3030
POLLOUT,

src/sched.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use {Errno, Error, Result};
77
// For some functions taking with a parameter of type CloneFlags,
88
// only a subset of these flags have an effect.
99
libc_bitflags!{
10-
flags CloneFlags: libc::c_int {
10+
pub flags CloneFlags: libc::c_int {
1111
CLONE_VM,
1212
CLONE_FS,
1313
CLONE_FILES,

src/sys/epoll.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::os::unix::io::RawFd;
44

55
bitflags!(
66
#[repr(C)]
7-
flags EpollFlags: u32 {
7+
pub flags EpollFlags: u32 {
88
const EPOLLIN = 0x001,
99
const EPOLLPRI = 0x002,
1010
const EPOLLOUT = 0x004,
@@ -32,7 +32,7 @@ pub enum EpollOp {
3232
}
3333

3434
libc_bitflags!{
35-
flags EpollCreateFlags: c_int {
35+
pub flags EpollCreateFlags: c_int {
3636
EPOLL_CLOEXEC,
3737
}
3838
}

src/sys/event.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ pub type type_of_event_flag = u16;
7575
#[cfg(any(target_os = "netbsd", target_os = "openbsd"))]
7676
pub type type_of_event_flag = u32;
7777
libc_bitflags!{
78-
flags EventFlag: type_of_event_flag {
78+
pub flags EventFlag: type_of_event_flag {
7979
EV_ADD,
8080
EV_CLEAR,
8181
EV_DELETE,
@@ -103,7 +103,7 @@ libc_bitflags!{
103103
}
104104

105105
bitflags!(
106-
flags FilterFlag: u32 {
106+
pub flags FilterFlag: u32 {
107107
#[cfg(target_os = "macos")]
108108
const NOTE_ABSOLUTE = libc::NOTE_ABSOLUTE,
109109
const NOTE_ATTRIB = libc::NOTE_ATTRIB,

src/sys/eventfd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::os::unix::io::RawFd;
33
use {Errno, Result};
44

55
libc_bitflags! {
6-
flags EfdFlags: libc::c_int {
6+
pub flags EfdFlags: libc::c_int {
77
const EFD_CLOEXEC, // Since Linux 2.6.27
88
const EFD_NONBLOCK, // Since Linux 2.6.27
99
const EFD_SEMAPHORE, // Since Linux 2.6.30

src/sys/memfd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use {Errno, Result};
44
use std::ffi::CStr;
55

66
bitflags!(
7-
flags MemFdCreateFlag: libc::c_uint {
7+
pub flags MemFdCreateFlag: libc::c_uint {
88
const MFD_CLOEXEC = 0x0001,
99
const MFD_ALLOW_SEALING = 0x0002,
1010
}

0 commit comments

Comments
 (0)