Skip to content

Commit

Permalink
Auto merge of rust-lang#485 - dhduvall:solaris-flock, r=alexcrichton
Browse files Browse the repository at this point in the history
Add Solaris constants for fcntl-style advisory locking

Solaris doesn't implement flock(), so any Rust implementation of flock()
will need to implement it using fcntl(), using the F_RDLCK, F_WRLCK, and
F_UNLCK constants.
  • Loading branch information
bors committed Jan 3, 2017
2 parents 7d57bdc + 14eaaf8 commit 4f3ec99
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/unix/solaris/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,10 @@ pub const LOCK_EX: ::c_int = 2;
pub const LOCK_NB: ::c_int = 4;
pub const LOCK_UN: ::c_int = 8;

pub const F_RDLCK: ::c_short = 1;
pub const F_WRLCK: ::c_short = 2;
pub const F_UNLCK: ::c_short = 3;

pub const O_SYNC: ::c_int = 16;
pub const O_NONBLOCK: ::c_int = 128;

Expand Down

0 comments on commit 4f3ec99

Please sign in to comment.