Skip to content

Commit 299e3f6

Browse files
committed
Auto merge of rust-lang#624 - equal-l2:add-bsd-flag, r=alexcrichton
Add BSD flags
2 parents b88c8f5 + 00fae9e commit 299e3f6

File tree

5 files changed

+12
-0
lines changed

5 files changed

+12
-0
lines changed

src/unix/bsd/freebsdlike/dragonfly/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ pub const PTHREAD_STACK_MIN: ::size_t = 1024;
138138
pub const SIGSTKSZ: ::size_t = 40960;
139139
pub const MADV_INVAL: ::c_int = 10;
140140
pub const O_CLOEXEC: ::c_int = 0x00020000;
141+
pub const O_DIRECTORY: ::c_int = 0x08000000;
141142
pub const F_GETLK: ::c_int = 7;
142143
pub const F_SETLK: ::c_int = 8;
143144
pub const F_SETLKW: ::c_int = 9;

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ pub const SF_NODISKIO: ::c_int = 0x00000001;
139139
pub const SF_MNOWAIT: ::c_int = 0x00000002;
140140
pub const SF_SYNC: ::c_int = 0x00000004;
141141
pub const O_CLOEXEC: ::c_int = 0x00100000;
142+
pub const O_DIRECTORY: ::c_int = 0x00020000;
143+
pub const O_EXEC: ::c_int = 0x00040000;
144+
pub const O_TTY_INIT: ::c_int = 0x00080000;
142145
pub const F_GETLK: ::c_int = 11;
143146
pub const F_SETLK: ::c_int = 12;
144147
pub const F_SETLKW: ::c_int = 13;

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,8 @@ pub const L_tmpnam: ::c_uint = 1024;
273273
pub const TMP_MAX: ::c_uint = 308915776;
274274

275275
pub const O_NOCTTY: ::c_int = 32768;
276+
pub const O_DIRECT: ::c_int = 0x00010000;
277+
276278
pub const S_IFIFO: mode_t = 4096;
277279
pub const S_IFCHR: mode_t = 8192;
278280
pub const S_IFBLK: mode_t = 24576;

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,8 @@ pub const O_ALT_IO: ::c_int = 0x40000;
271271
pub const O_NOSIGPIPE: ::c_int = 0x1000000;
272272
pub const O_SEARCH: ::c_int = 0x800000;
273273
pub const O_DIRECTORY: ::c_int = 0x200000;
274+
pub const O_DIRECT : ::c_int = 0x00080000;
275+
pub const O_RSYNC : ::c_int = 0x00020000;
274276

275277
pub const MS_SYNC : ::c_int = 0x4;
276278
pub const MS_INVALIDATE : ::c_int = 0x2;

src/unix/bsd/netbsdlike/openbsdlike/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use unix::bsd::O_SYNC;
2+
13
pub type clock_t = i64;
24
pub type suseconds_t = ::c_long;
35
pub type dev_t = i32;
@@ -140,6 +142,8 @@ pub const UT_LINESIZE: usize = 8;
140142
pub const UT_HOSTSIZE: usize = 256;
141143

142144
pub const O_CLOEXEC: ::c_int = 0x10000;
145+
pub const O_DIRECTORY: ::c_int = 0x20000;
146+
pub const O_RSYNC: ::c_int = O_SYNC;
143147

144148
pub const MS_SYNC : ::c_int = 0x0002;
145149
pub const MS_INVALIDATE : ::c_int = 0x0004;

0 commit comments

Comments
 (0)