Add flock64 to linux_like platforms

This commit is contained in:
Elichai Turkel 2019-10-18 15:46:38 +03:00
parent 53bdffc028
commit c70634e486
No known key found for this signature in database
GPG Key ID: 9383CDE9E8E66A7F
12 changed files with 93 additions and 0 deletions

View File

@ -22,6 +22,8 @@ pub type ino_t = ::c_ulong;
pub type __CPU_BITTYPE = ::c_ulong;
pub type idtype_t = ::c_int;
pub type loff_t = ::c_longlong;
pub type __kernel_loff_t = ::c_longlong;
pub type __kernel_pid_t = ::c_int;
s! {
pub struct stack_t {
@ -78,6 +80,14 @@ s! {
pub l_pid: ::pid_t,
}
pub struct flock64 {
pub l_type: ::c_short,
pub l_whence: ::c_short,
pub l_start: ::__kernel_loff_t,
pub l_len: ::__kernel_loff_t,
pub l_pid: ::__kernel_pid_t,
}
pub struct cpu_set_t {
#[cfg(target_pointer_width = "64")]
__bits: [__CPU_BITTYPE; 16],

View File

@ -223,6 +223,14 @@ s! {
pub l_pid: ::pid_t,
}
pub struct flock64 {
pub l_type: ::c_short,
pub l_whence: ::c_short,
pub l_start: ::off64_t,
pub l_len: ::off64_t,
pub l_pid: ::pid_t,
}
pub struct pthread_attr_t {
__size: [u32; 11]
}

View File

@ -33,6 +33,14 @@ s! {
pub l_pid: ::pid_t,
}
pub struct flock64 {
pub l_type: ::c_short,
pub l_whence: ::c_short,
pub l_start: ::off64_t,
pub l_len: ::off64_t,
pub l_pid: ::pid_t,
}
pub struct ipc_perm {
pub __key: ::key_t,
pub uid: ::uid_t,

View File

@ -33,6 +33,14 @@ s! {
pub l_pid: ::pid_t,
}
pub struct flock64 {
pub l_type: ::c_short,
pub l_whence: ::c_short,
pub l_start: ::off64_t,
pub l_len: ::off64_t,
pub l_pid: ::pid_t,
}
pub struct ipc_perm {
__key: ::key_t,
pub uid: ::uid_t,

View File

@ -34,6 +34,14 @@ s! {
pub l_pid: ::pid_t,
}
pub struct flock64 {
pub l_type: ::c_short,
pub l_whence: ::c_short,
pub l_start: ::off64_t,
pub l_len: ::off64_t,
pub l_pid: ::pid_t,
}
pub struct _libc_fpreg {
pub significand: [u16; 4],
pub exponent: u16,

View File

@ -45,6 +45,14 @@ s! {
pub l_pid: ::pid_t,
}
pub struct flock64 {
pub l_type: ::c_short,
pub l_whence: ::c_short,
pub l_start: ::off64_t,
pub l_len: ::off64_t,
pub l_pid: ::pid_t,
}
pub struct stat {
pub st_dev: ::dev_t,
pub st_ino: ::ino_t,

View File

@ -57,6 +57,14 @@ s! {
pub l_pid: ::pid_t,
}
pub struct flock64 {
pub l_type: ::c_short,
pub l_whence: ::c_short,
pub l_start: ::off64_t,
pub l_len: ::off64_t,
pub l_pid: ::pid_t,
}
pub struct stat64 {
pub st_dev: ::c_ulong,
st_pad1: [::c_long; 2],

View File

@ -45,6 +45,14 @@ s! {
pub l_pid: ::pid_t,
}
pub struct flock64 {
pub l_type: ::c_short,
pub l_whence: ::c_short,
pub l_start: ::off64_t,
pub l_len: ::off64_t,
pub l_pid: ::pid_t,
}
pub struct stat {
pub st_dev: ::dev_t,
pub st_ino: ::ino_t,

View File

@ -44,6 +44,14 @@ s! {
pub l_pid: ::pid_t,
}
pub struct flock64 {
pub l_type: ::c_short,
pub l_whence: ::c_short,
pub l_start: ::off64_t,
pub l_len: ::off64_t,
pub l_pid: ::pid_t,
}
pub struct siginfo_t {
pub si_signo: ::c_int,
pub si_errno: ::c_int,

View File

@ -60,6 +60,15 @@ s! {
pub l_pid: ::pid_t,
}
pub struct flock64 {
pub l_type: ::c_short,
pub l_whence: ::c_short,
pub l_start: ::off64_t,
pub l_len: ::off64_t,
pub l_pid: ::pid_t,
__reserved: ::c_short,
}
pub struct stack_t {
pub ss_sp: *mut ::c_void,
pub ss_flags: ::c_int,

View File

@ -42,6 +42,14 @@ s! {
pub l_pid: ::pid_t,
}
pub struct flock64 {
pub l_type: ::c_short,
pub l_whence: ::c_short,
pub l_start: ::off64_t,
pub l_len: ::off64_t,
pub l_pid: ::pid_t,
}
pub struct siginfo_t {
pub si_signo: ::c_int,
pub si_errno: ::c_int,

View File

@ -13,6 +13,8 @@ pub type fsblkcnt_t = ::c_ulonglong;
pub type fsfilcnt_t = ::c_ulonglong;
pub type rlim_t = ::c_ulonglong;
pub type flock64 = flock;
impl siginfo_t {
pub unsafe fn si_addr(&self) -> *mut ::c_void {
#[repr(C)]