Skip to content

Commit 31a60da

Browse files
committed
Bump bitflags to 0.7
1 parent 7a91a81 commit 31a60da

20 files changed

+52
-52
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ signalfd = []
2323

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

src/fcntl.rs

+12-12
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

+2-2
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

+2-2
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

+1-1
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

+1-1
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

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use ::Error;
77

88
bitflags!(
99
#[repr(C)]
10-
flags EpollFlags: u32 {
10+
pub flags EpollFlags: u32 {
1111
const EPOLLIN = 0x001,
1212
const EPOLLPRI = 0x002,
1313
const EPOLLOUT = 0x004,
@@ -35,7 +35,7 @@ pub enum EpollOp {
3535
}
3636

3737
libc_bitflags!{
38-
flags EpollCreateFlags: c_int {
38+
pub flags EpollCreateFlags: c_int {
3939
EPOLL_CLOEXEC,
4040
}
4141
}

src/sys/event.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub type type_of_event_flag = u16;
7878
#[cfg(any(target_os = "netbsd", target_os = "openbsd"))]
7979
pub type type_of_event_flag = u32;
8080
libc_bitflags!{
81-
flags EventFlag: type_of_event_flag {
81+
pub flags EventFlag: type_of_event_flag {
8282
EV_ADD,
8383
EV_CLEAR,
8484
EV_DELETE,
@@ -106,7 +106,7 @@ libc_bitflags!{
106106
}
107107

108108
bitflags!(
109-
flags FilterFlag: u32 {
109+
pub flags FilterFlag: u32 {
110110
#[cfg(any(target_os = "macos", target_os = "ios"))]
111111
const NOTE_ABSOLUTE = libc::NOTE_ABSOLUTE,
112112
const NOTE_ATTRIB = libc::NOTE_ATTRIB,

src/sys/eventfd.rs

+1-1
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
EFD_CLOEXEC, // Since Linux 2.6.27
88
EFD_NONBLOCK, // Since Linux 2.6.27
99
EFD_SEMAPHORE, // Since Linux 2.6.30

src/sys/memfd.rs

+1-1
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
}

src/sys/mman.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::os::unix::io::RawFd;
77
pub use self::consts::*;
88

99
libc_bitflags!{
10-
flags ProtFlags: libc::c_int {
10+
pub flags ProtFlags: libc::c_int {
1111
PROT_NONE,
1212
PROT_READ,
1313
PROT_WRITE,
@@ -24,7 +24,7 @@ mod consts {
2424
use libc::{self, c_int};
2525

2626
bitflags!{
27-
flags MapFlags: c_int {
27+
pub flags MapFlags: c_int {
2828
const MAP_FILE = libc::MAP_FILE,
2929
const MAP_SHARED = libc::MAP_SHARED,
3030
const MAP_PRIVATE = libc::MAP_PRIVATE,
@@ -65,7 +65,7 @@ mod consts {
6565

6666

6767
bitflags!{
68-
flags MsFlags: c_int {
68+
pub flags MsFlags: c_int {
6969
const MS_ASYNC = libc::MS_ASYNC,
7070
const MS_INVALIDATE = libc::MS_INVALIDATE,
7171
const MS_SYNC = libc::MS_SYNC,
@@ -81,7 +81,7 @@ mod consts {
8181
use libc::{self, c_int};
8282

8383
bitflags!{
84-
flags MapFlags: c_int {
84+
pub flags MapFlags: c_int {
8585
const MAP_FILE = libc::MAP_FILE,
8686
const MAP_SHARED = libc::MAP_SHARED,
8787
const MAP_PRIVATE = libc::MAP_PRIVATE,
@@ -106,7 +106,7 @@ mod consts {
106106
pub const MADV_CAN_REUSE : MmapAdvise = 9;
107107

108108
bitflags!{
109-
flags MsFlags: c_int {
109+
pub flags MsFlags: c_int {
110110
const MS_ASYNC = libc::MS_ASYNC, /* [MF|SIO] return immediately */
111111
const MS_INVALIDATE = libc::MS_INVALIDATE, /* [MF|SIO] invalidate all cached data */
112112
const MS_KILLPAGES = libc::MS_KILLPAGES, /* invalidate pages, leave mapped */
@@ -123,7 +123,7 @@ mod consts {
123123
use libc::{self, c_int};
124124

125125
bitflags!{
126-
flags MapFlags: c_int {
126+
pub flags MapFlags: c_int {
127127
const MAP_FILE = libc::MAP_FILE,
128128
const MAP_SHARED = libc::MAP_SHARED,
129129
const MAP_PRIVATE = libc::MAP_PRIVATE,
@@ -161,7 +161,7 @@ mod consts {
161161
pub const MADV_SETMAP : MmapAdvise = 11; /* set page table directory page for map */
162162

163163
bitflags!{
164-
flags MsFlags: c_int {
164+
pub flags MsFlags: c_int {
165165
const MS_ASYNC = libc::MS_ASYNC, /* [MF|SIO] return immediately */
166166
const MS_INVALIDATE = libc::MS_INVALIDATE, /* [MF|SIO] invalidate all cached data */
167167
#[cfg(not(target_os = "dragonfly"))]

src/sys/quota.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub mod quota {
4141

4242
bitflags!(
4343
#[derive(Default)]
44-
flags QuotaValidFlags: u32 {
44+
pub flags QuotaValidFlags: u32 {
4545
const QIF_BLIMITS = 1,
4646
const QIF_SPACE = 2,
4747
const QIF_ILIMITS = 4,

src/sys/signal.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ pub const SIGPOLL : Signal = SIGIO;
197197
pub const SIGUNUSED : Signal = SIGSYS;
198198

199199
bitflags!{
200-
flags SaFlags: libc::c_int {
200+
pub flags SaFlags: libc::c_int {
201201
const SA_NOCLDSTOP = libc::SA_NOCLDSTOP,
202202
const SA_NOCLDWAIT = libc::SA_NOCLDWAIT,
203203
const SA_NODEFER = libc::SA_NODEFER,

src/sys/signalfd.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use std::mem;
2626

2727

2828
bitflags!{
29-
flags SfdFlags: libc::c_int {
29+
pub flags SfdFlags: libc::c_int {
3030
const SFD_NONBLOCK = libc::SFD_NONBLOCK,
3131
const SFD_CLOEXEC = libc::SFD_CLOEXEC,
3232
}

src/sys/socket/consts.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ mod os {
9090

9191
// Flags for send/recv and their relatives
9292
bitflags!{
93-
flags MsgFlags : libc::c_int {
93+
pub flags MsgFlags : libc::c_int {
9494
const MSG_OOB = 0x0001,
9595
const MSG_PEEK = 0x0002,
9696
const MSG_CTRUNC = 0x0008,
@@ -232,7 +232,7 @@ mod os {
232232

233233
// Flags for send/recv and their relatives
234234
bitflags!{
235-
flags MsgFlags : libc::c_int {
235+
pub flags MsgFlags : libc::c_int {
236236
const MSG_OOB = 0x01,
237237
const MSG_PEEK = 0x02,
238238
const MSG_EOR = 0x08,
@@ -318,7 +318,7 @@ mod os {
318318

319319
// Flags for send/recv and their relatives
320320
bitflags!{
321-
flags MsgFlags : libc::c_int {
321+
pub flags MsgFlags : libc::c_int {
322322
const MSG_OOB = 0x01,
323323
const MSG_PEEK = 0x02,
324324
const MSG_DONTWAIT = 0x80,

src/sys/socket/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ pub enum SockType {
6464

6565
// Extra flags - Supported by Linux 2.6.27, normalized on other platforms
6666
bitflags!(
67-
flags SockFlag: c_int {
67+
pub flags SockFlag: c_int {
6868
const SOCK_NONBLOCK = 0o0004000,
6969
const SOCK_CLOEXEC = 0o2000000
7070
}

src/sys/stat.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ mod ffi {
1717
}
1818

1919
bitflags!(
20-
flags SFlag: mode_t {
20+
pub flags SFlag: mode_t {
2121
const S_IFIFO = libc::S_IFIFO,
2222
const S_IFCHR = libc::S_IFCHR,
2323
const S_IFDIR = libc::S_IFDIR,
@@ -30,7 +30,7 @@ bitflags!(
3030
);
3131

3232
bitflags! {
33-
flags Mode: mode_t {
33+
pub flags Mode: mode_t {
3434
const S_IRWXU = libc::S_IRWXU,
3535
const S_IRUSR = libc::S_IRUSR,
3636
const S_IWUSR = libc::S_IWUSR,

src/sys/statvfs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub mod vfs {
2121
/// Mount Flags
2222
#[repr(C)]
2323
#[derive(Default)]
24-
flags FsFlags: c_ulong {
24+
pub flags FsFlags: c_ulong {
2525
/// Read Only
2626
const RDONLY = 1,
2727
/// Do not allow the set-uid bits to have an effect

0 commit comments

Comments
 (0)