From cb39828ecd7ea5d2eac3076ad3dd1b6ef05e10d3 Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Sun, 26 Mar 2017 17:07:34 -0700 Subject: Import subrepo libc/:libc at 05a2d197356ef253dfd985166576619ac9b6947f --- libc/src/unix/notbsd/linux/other/b64/mod.rs | 67 +++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 libc/src/unix/notbsd/linux/other/b64/mod.rs (limited to 'libc/src/unix/notbsd/linux/other/b64/mod.rs') diff --git a/libc/src/unix/notbsd/linux/other/b64/mod.rs b/libc/src/unix/notbsd/linux/other/b64/mod.rs new file mode 100644 index 0000000..2fcec73 --- /dev/null +++ b/libc/src/unix/notbsd/linux/other/b64/mod.rs @@ -0,0 +1,67 @@ +//! 64-bit specific definitions for linux-like values + +pub type c_long = i64; +pub type c_ulong = u64; +pub type clock_t = i64; +pub type time_t = i64; +pub type ino_t = u64; +pub type off_t = i64; +pub type blkcnt_t = i64; +pub type __fsword_t = ::c_long; + +s! { + pub struct sigset_t { + __val: [::c_ulong; 16], + } + + pub struct sysinfo { + pub uptime: ::c_long, + pub loads: [::c_ulong; 3], + pub totalram: ::c_ulong, + pub freeram: ::c_ulong, + pub sharedram: ::c_ulong, + pub bufferram: ::c_ulong, + pub totalswap: ::c_ulong, + pub freeswap: ::c_ulong, + pub procs: ::c_ushort, + pub pad: ::c_ushort, + pub totalhigh: ::c_ulong, + pub freehigh: ::c_ulong, + pub mem_unit: ::c_uint, + pub _f: [::c_char; 0], + } + + pub struct msqid_ds { + pub msg_perm: ::ipc_perm, + pub msg_stime: ::time_t, + pub msg_rtime: ::time_t, + pub msg_ctime: ::time_t, + __msg_cbytes: ::c_ulong, + pub msg_qnum: ::msgqnum_t, + pub msg_qbytes: ::msglen_t, + pub msg_lspid: ::pid_t, + pub msg_lrpid: ::pid_t, + __glibc_reserved4: ::c_ulong, + __glibc_reserved5: ::c_ulong, + } +} + +pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; + +cfg_if! { + if #[cfg(target_arch = "aarch64")] { + mod aarch64; + pub use self::aarch64::*; + } else if #[cfg(any(target_arch = "powerpc64"))] { + mod powerpc64; + pub use self::powerpc64::*; + } else if #[cfg(any(target_arch = "sparc64"))] { + mod sparc64; + pub use self::sparc64::*; + } else if #[cfg(any(target_arch = "x86_64"))] { + mod x86_64; + pub use self::x86_64::*; + } else { + // Unknown target_arch + } +} -- cgit v1.2.1