unfork freebsd stat definitions, fixes x86

This commit is contained in:
Ali Clark 2016-02-17 14:10:02 +00:00
parent cf144d16e9
commit c99409f793

View File

@ -18,134 +18,62 @@
definitions")]
#![allow(deprecated)]
#[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64;
#[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = u64;
#[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = u64;
#[stable(feature = "raw_ext", since = "1.1.0")] pub type dev_t = u64;
#[stable(feature = "raw_ext", since = "1.1.0")] pub type fflags_t = u32;
#[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64;
#[stable(feature = "raw_ext", since = "1.1.0")] pub type mode_t = u32;
#[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u64;
#[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = u64;
#[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = u64;
#[stable(feature = "raw_ext", since = "1.1.0")] pub type fflags_t = u32;
#[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64;
#[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
#[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize;
#[doc(inline)]
#[repr(C)]
#[derive(Clone)]
#[stable(feature = "raw_ext", since = "1.1.0")]
pub use self::arch::{stat, time_t};
#[cfg(target_arch = "x86")]
mod arch {
use super::{off_t, dev_t, ino_t, mode_t, nlink_t, blksize_t, blkcnt_t, fflags_t};
use os::raw::c_long;
use os::unix::raw::{uid_t, gid_t};
#[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
#[repr(C)]
#[derive(Clone)]
pub struct stat {
#[stable(feature = "raw_ext", since = "1.1.0")]
pub struct stat {
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_dev: dev_t,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_ino: ino_t,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_mode: mode_t,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_nlink: nlink_t,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_uid: uid_t,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_gid: gid_t,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_rdev: dev_t,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_atime: time_t,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_atime_nsec: c_long,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_mtime: time_t,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_mtime_nsec: c_long,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_ctime: time_t,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_ctime_nsec: c_long,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_size: off_t,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_blocks: blkcnt_t,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_blksize: blksize_t,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_flags: fflags_t,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_gen: u32,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_lspare: i32,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_birthtime: time_t,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_birthtime_nsec: c_long,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub __unused: [u8; 8],
}
}
#[cfg(target_arch = "x86_64")]
mod arch {
use super::{off_t, dev_t, ino_t, mode_t, nlink_t, blksize_t, blkcnt_t, fflags_t};
use os::raw::c_long;
use os::unix::raw::{uid_t, gid_t};
#[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
#[repr(C)]
#[derive(Clone)]
pub st_dev: u32,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub struct stat {
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_dev: u32,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_ino: u32,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_mode: u16,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_nlink: u16,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_uid: u32,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_gid: u32,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_rdev: u32,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_atime: i64,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_atime_nsec: i64,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_mtime: i64,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_mtime_nsec: i64,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_ctime: i64,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_ctime_nsec: i64,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_size: i64,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_blocks: i64,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_blksize: u32,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_flags: u32,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_gen: u32,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_lspare: i32,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_birthtime: i64,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_birthtime_nsec: i64,
}
pub st_ino: u32,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_mode: u16,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_nlink: u16,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_uid: u32,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_gid: u32,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_rdev: u32,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_atime: i64,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_atime_nsec: i64,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_mtime: i64,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_mtime_nsec: i64,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_ctime: i64,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_ctime_nsec: i64,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_size: i64,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_blocks: i64,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_blksize: u32,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_flags: u32,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_gen: u32,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_lspare: i32,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_birthtime: i64,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_birthtime_nsec: i64,
}