Skip to content

Add F_RDLCK/F_WRLCK/F_UNLCK to several platforms #1118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 3, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/unix/haiku/mod.rs
Original file line number Diff line number Diff line change
@@ -351,6 +351,10 @@ pub const F_SETLK: ::c_int = 0x0080;
pub const F_SETLKW: ::c_int = 0x0100;
pub const F_DUPFD_CLOEXEC: ::c_int = 0x0200;

pub const F_RDLCK: ::c_int = 0x0040;
pub const F_UNLCK: ::c_int = 0x0200;
pub const F_WRLCK: ::c_int = 0x0400;

pub const AT_FDCWD: ::c_int = -1;
pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x01;
pub const AT_SYMLINK_FOLLOW: ::c_int = 0x02;
4 changes: 4 additions & 0 deletions src/unix/notbsd/android/mod.rs
Original file line number Diff line number Diff line change
@@ -744,6 +744,10 @@ pub const F_SETOWN: ::c_int = 8;
pub const F_SETLK: ::c_int = 6;
pub const F_SETLKW: ::c_int = 7;

pub const F_RDLCK: ::c_int = 0;
pub const F_WRLCK: ::c_int = 1;
pub const F_UNLCK: ::c_int = 2;

pub const TCGETS: ::c_int = 0x5401;
pub const TCSETS: ::c_int = 0x5402;
pub const TCSETSW: ::c_int = 0x5403;
4 changes: 4 additions & 0 deletions src/unix/notbsd/linux/musl/mod.rs
Original file line number Diff line number Diff line change
@@ -121,6 +121,10 @@ pub const ECOMM: ::c_int = 70;
pub const EPROTO: ::c_int = 71;
pub const EDOTDOT: ::c_int = 73;

pub const F_RDLCK: ::c_int = 0;
pub const F_WRLCK: ::c_int = 1;
pub const F_UNLCK: ::c_int = 2;

pub const SA_NODEFER: ::c_int = 0x40000000;
pub const SA_RESETHAND: ::c_int = 0x80000000;
pub const SA_RESTART: ::c_int = 0x10000000;
4 changes: 4 additions & 0 deletions src/unix/notbsd/linux/other/b32/mod.rs
Original file line number Diff line number Diff line change
@@ -251,6 +251,10 @@ pub const F_SETOWN: ::c_int = 8;
pub const F_SETLK: ::c_int = 6;
pub const F_SETLKW: ::c_int = 7;

pub const F_RDLCK: ::c_int = 0;
pub const F_WRLCK: ::c_int = 1;
pub const F_UNLCK: ::c_int = 2;

pub const SFD_NONBLOCK: ::c_int = 0x0800;

pub const TIOCEXCL: ::c_ulong = 0x540C;
4 changes: 4 additions & 0 deletions src/unix/notbsd/linux/other/b64/aarch64.rs
Original file line number Diff line number Diff line change
@@ -340,6 +340,10 @@ pub const F_SETOWN: ::c_int = 8;
pub const F_SETLK: ::c_int = 6;
pub const F_SETLKW: ::c_int = 7;

pub const F_RDLCK: ::c_int = 0;
pub const F_WRLCK: ::c_int = 1;
pub const F_UNLCK: ::c_int = 2;

pub const SFD_NONBLOCK: ::c_int = 0x0800;

pub const TIOCEXCL: ::c_ulong = 0x540C;
4 changes: 4 additions & 0 deletions src/unix/notbsd/linux/other/b64/powerpc64.rs
Original file line number Diff line number Diff line change
@@ -327,6 +327,10 @@ pub const F_SETOWN: ::c_int = 8;
pub const F_SETLK: ::c_int = 6;
pub const F_SETLKW: ::c_int = 7;

pub const F_RDLCK: ::c_int = 0;
pub const F_WRLCK: ::c_int = 1;
pub const F_UNLCK: ::c_int = 2;

pub const SFD_NONBLOCK: ::c_int = 0x0800;

pub const TIOCEXCL: ::c_ulong = 0x540C;
4 changes: 4 additions & 0 deletions src/unix/notbsd/linux/other/b64/sparc64.rs
Original file line number Diff line number Diff line change
@@ -305,6 +305,10 @@ pub const F_SETOWN: ::c_int = 6;
pub const F_SETLK: ::c_int = 8;
pub const F_SETLKW: ::c_int = 9;

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

pub const SFD_NONBLOCK: ::c_int = 0x4000;

pub const TIOCEXCL: ::c_ulong = 0x2000740d;