diff options
| author | bors <bors@rust-lang.org> | 2015-06-05 11:59:34 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-06-05 11:59:34 +0000 |
| commit | 19a39710c494d9300ffdc4e3f40dfda0ef62f7ba (patch) | |
| tree | f2d56fe4efeb621e238b7d98424169b9f9fd5e6d /src/libstd | |
| parent | ef72938a8b9171abc5c4b463d3e8345dc0e603a6 (diff) | |
| parent | eb6a70cbabbc74699e2b0331fef91be1fadad1bd (diff) | |
| download | rust-19a39710c494d9300ffdc4e3f40dfda0ef62f7ba.tar.gz rust-19a39710c494d9300ffdc4e3f40dfda0ef62f7ba.zip | |
Auto merge of #26028 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #25925, #26001, #26010, #26011, #26017, #26020 - Failed merges:
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/os/android/raw.rs | 115 |
1 files changed, 82 insertions, 33 deletions
diff --git a/src/libstd/os/android/raw.rs b/src/libstd/os/android/raw.rs index 538ed7c4688..ea80151623b 100644 --- a/src/libstd/os/android/raw.rs +++ b/src/libstd/os/android/raw.rs @@ -10,37 +10,86 @@ //! Android-specific raw type definitions -use os::raw::{c_uint, c_uchar, c_ulonglong, c_longlong, c_ulong}; -use os::unix::raw::{uid_t, gid_t}; - -pub type blkcnt_t = u32; -pub type blksize_t = u32; -pub type dev_t = u32; -pub type ino_t = u32; -pub type mode_t = u16; -pub type nlink_t = u16; -pub type off_t = i32; -pub type time_t = i32; - -#[repr(C)] -pub struct stat { - pub st_dev: c_ulonglong, - pub __pad0: [c_uchar; 4], - pub __st_ino: ino_t, - pub st_mode: c_uint, - pub st_nlink: c_uint, - pub st_uid: uid_t, - pub st_gid: gid_t, - pub st_rdev: c_ulonglong, - pub __pad3: [c_uchar; 4], - pub st_size: c_longlong, - pub st_blksize: blksize_t, - pub st_blocks: c_ulonglong, - pub st_atime: time_t, - pub st_atime_nsec: c_ulong, - pub st_mtime: time_t, - pub st_mtime_nsec: c_ulong, - pub st_ctime: time_t, - pub st_ctime_nsec: c_ulong, - pub st_ino: c_ulonglong, +#[doc(inline)] +pub use self::arch::{dev_t, mode_t, blkcnt_t, blksize_t, ino_t, nlink_t, off_t, stat, time_t}; + +#[cfg(target_arch = "arm")] +mod arch { + use os::raw::{c_uint, c_uchar, c_ulonglong, c_longlong, c_ulong}; + use os::unix::raw::{uid_t, gid_t}; + + pub type dev_t = u32; + pub type mode_t = u16; + + pub type blkcnt_t = u32; + pub type blksize_t = u32; + pub type ino_t = u32; + pub type nlink_t = u16; + pub type off_t = i32; + pub type time_t = i32; + + #[repr(C)] + pub struct stat { + pub st_dev: c_ulonglong, + pub __pad0: [c_uchar; 4], + pub __st_ino: ino_t, + pub st_mode: c_uint, + pub st_nlink: c_uint, + pub st_uid: uid_t, + pub st_gid: gid_t, + pub st_rdev: c_ulonglong, + pub __pad3: [c_uchar; 4], + pub st_size: c_longlong, + pub st_blksize: blksize_t, + pub st_blocks: c_ulonglong, + pub st_atime: time_t, + pub st_atime_nsec: c_ulong, + pub st_mtime: time_t, + pub st_mtime_nsec: c_ulong, + pub st_ctime: time_t, + pub st_ctime_nsec: c_ulong, + pub st_ino: c_ulonglong, + } + +} + + +#[cfg(target_arch = "aarch64")] +mod arch { + use os::raw::{c_uchar, c_ulong}; + use os::unix::raw::{uid_t, gid_t}; + + pub type dev_t = u64; + pub type mode_t = u32; + + pub type blkcnt_t = u64; + pub type blksize_t = u32; + pub type ino_t = u64; + pub type nlink_t = u32; + pub type off_t = i64; + pub type time_t = i64; + + #[repr(C)] + pub struct stat { + pub st_dev: dev_t, + pub __pad0: [c_uchar; 4], + pub __st_ino: ino_t, + pub st_mode: mode_t, + pub st_nlink: nlink_t, + pub st_uid: uid_t, + pub st_gid: gid_t, + pub st_rdev: dev_t, + pub __pad3: [c_uchar; 4], + pub st_size: off_t, + pub st_blksize: blksize_t, + pub st_blocks: blkcnt_t, + pub st_atime: time_t, + pub st_atime_nsec: c_ulong, + pub st_mtime: time_t, + pub st_mtime_nsec: c_ulong, + pub st_ctime: time_t, + pub st_ctime_nsec: c_ulong, + pub st_ino: ino_t, + } + } |
