diff options
| author | bors <bors@rust-lang.org> | 2015-06-24 19:44:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-06-24 19:44:10 +0000 |
| commit | 21dd4e2a0627daa2f9023084e253e75ccfaa5137 (patch) | |
| tree | f22df1a2a9393f50b4f61ddde9f9690ee3c06c01 /src | |
| parent | e2c273f1bb3a7f3d11097533ff59460ef8a9a5c6 (diff) | |
| parent | 0f1e5144007b255c87c15badefc0a8b7612137b6 (diff) | |
| download | rust-21dd4e2a0627daa2f9023084e253e75ccfaa5137.tar.gz rust-21dd4e2a0627daa2f9023084e253e75ccfaa5137.zip | |
Auto merge of #26546 - agrover:add_flock, r=alexcrichton
flock(2) is in bsd44. Add its fn definition and constants.
Diffstat (limited to 'src')
| -rw-r--r-- | src/liblibc/lib.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs index 47268fbc4c1..6e01796ad82 100644 --- a/src/liblibc/lib.rs +++ b/src/liblibc/lib.rs @@ -3600,6 +3600,11 @@ pub mod consts { pub const SHUT_RD: c_int = 0; pub const SHUT_WR: c_int = 1; pub const SHUT_RDWR: c_int = 2; + + pub const LOCK_SH: c_int = 1; + pub const LOCK_EX: c_int = 2; + pub const LOCK_NB: c_int = 4; + pub const LOCK_UN: c_int = 8; } #[cfg(any(target_arch = "mips", target_arch = "mipsel"))] @@ -3684,6 +3689,11 @@ pub mod consts { pub const SHUT_RD: c_int = 0; pub const SHUT_WR: c_int = 1; pub const SHUT_RDWR: c_int = 2; + + pub const LOCK_SH: c_int = 1; + pub const LOCK_EX: c_int = 2; + pub const LOCK_NB: c_int = 4; + pub const LOCK_UN: c_int = 8; } #[cfg(any(target_arch = "x86", target_arch = "x86_64", @@ -4227,6 +4237,11 @@ pub mod consts { pub const SHUT_RD: c_int = 0; pub const SHUT_WR: c_int = 1; pub const SHUT_RDWR: c_int = 2; + + pub const LOCK_SH: c_int = 1; + pub const LOCK_EX: c_int = 2; + pub const LOCK_NB: c_int = 4; + pub const LOCK_UN: c_int = 8; } pub mod extra { use types::os::arch::c95::c_int; @@ -4651,6 +4666,11 @@ pub mod consts { pub const SHUT_RD: c_int = 0; pub const SHUT_WR: c_int = 1; pub const SHUT_RDWR: c_int = 2; + + pub const LOCK_SH: c_int = 1; + pub const LOCK_EX: c_int = 2; + pub const LOCK_NB: c_int = 4; + pub const LOCK_UN: c_int = 8; } pub mod extra { use types::os::arch::c95::c_int; @@ -5092,6 +5112,11 @@ pub mod consts { pub const SHUT_RD: c_int = 0; pub const SHUT_WR: c_int = 1; pub const SHUT_RDWR: c_int = 2; + + pub const LOCK_SH: c_int = 1; + pub const LOCK_EX: c_int = 2; + pub const LOCK_NB: c_int = 4; + pub const LOCK_UN: c_int = 8; } pub mod extra { use types::os::arch::c95::c_int; @@ -6121,6 +6146,7 @@ pub mod funcs { -> c_int; pub fn realpath(pathname: *const c_char, resolved: *mut c_char) -> *mut c_char; + pub fn flock(fd: c_int, operation: c_int) -> c_int; } } @@ -6137,6 +6163,7 @@ pub mod funcs { -> c_int; pub fn mincore(addr: *mut c_void, len: size_t, vec: *mut c_uchar) -> c_int; + pub fn flock(fd: c_int, operation: c_int) -> c_int; } } |
