libc_interface/unix/notbsd/linux/other/b64/
mod.rs

1//! 64-bit specific definitions for linux-like values
2
3pub type clock_t = i64;
4pub type time_t = i64;
5pub type ino_t = u64;
6pub type off_t = i64;
7pub type blkcnt_t = i64;
8pub type __fsword_t = i64;
9pub type shmatt_t = u64;
10pub type msgqnum_t = u64;
11pub type msglen_t = u64;
12pub type fsblkcnt_t = u64;
13pub type fsfilcnt_t = u64;
14pub type rlim_t = u64;
15
16s! {
17    pub struct sigset_t {
18        #[cfg(target_pointer_width = "32")]
19        __val: [u32; 32],
20        #[cfg(target_pointer_width = "64")]
21        __val: [u64; 16],
22    }
23
24    pub struct sysinfo {
25        pub uptime: i64,
26        pub loads: [u64; 3],
27        pub totalram: u64,
28        pub freeram: u64,
29        pub sharedram: u64,
30        pub bufferram: u64,
31        pub totalswap: u64,
32        pub freeswap: u64,
33        pub procs: ::c_ushort,
34        pub pad: ::c_ushort,
35        pub totalhigh: u64,
36        pub freehigh: u64,
37        pub mem_unit: ::c_uint,
38        pub _f: [::c_char; 0],
39    }
40
41    pub struct msqid_ds {
42        pub msg_perm: ::ipc_perm,
43        pub msg_stime: ::time_t,
44        pub msg_rtime: ::time_t,
45        pub msg_ctime: ::time_t,
46        __msg_cbytes: u64,
47        pub msg_qnum: ::msgqnum_t,
48        pub msg_qbytes: ::msglen_t,
49        pub msg_lspid: ::pid_t,
50        pub msg_lrpid: ::pid_t,
51        __glibc_reserved4: u64,
52        __glibc_reserved5: u64,
53    }
54}
55
56pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
57
58pub const O_LARGEFILE: ::c_int = 0;
59
60cfg_if! {
61    if #[cfg(target_arch = "aarch64")] {
62        mod aarch64;
63        pub use self::aarch64::*;
64    } else if #[cfg(any(target_arch = "powerpc64"))] {
65        mod powerpc64;
66        pub use self::powerpc64::*;
67    } else if #[cfg(any(target_arch = "sparc64"))] {
68        mod sparc64;
69        pub use self::sparc64::*;
70    } else if #[cfg(any(target_arch = "x86_64"))] {
71        mod x86_64;
72        pub use self::x86_64::*;
73        cfg_if! {
74            if #[cfg(target_pointer_width = "32")] {
75                mod x32;
76                pub use self::x32::*;
77            } else {
78                mod not_x32;
79                pub use self::not_x32::*;
80            }
81        }
82    } else {
83        // Unknown target_arch
84    }
85}