Skip to content

Commit 911ff4f

Browse files
committed
Auto merge of #515 - SimonSapin:bitflagsup, r=posborne
Update bitflags to 0.7 Brought to you by GNU sed.
2 parents 7a91a81 + e47d55c commit 911ff4f

22 files changed

+54
-54
lines changed

CONVENTIONS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ For example,
5252

5353
```rust
5454
libc_bitflags!{
55-
flags ProtFlags: libc::c_int {
55+
pub flags ProtFlags: libc::c_int {
5656
PROT_NONE,
5757
PROT_READ,
5858
PROT_WRITE,

Cargo.toml

Lines changed: 1 addition & 1 deletion
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

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/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/// # Example
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,

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
@@ -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

Lines changed: 2 additions & 2 deletions
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,

0 commit comments

Comments
 (0)