Skip to content
Snippets Groups Projects
Commit 27f7a6c1 authored by Alex Crichton's avatar Alex Crichton
Browse files

Consolidate common linux defn's upwards

parent 50a42e20
No related branches found
No related tags found
No related merge requests found
//! 32-bit specific definitions for linux-like values
pub type c_char = i8;
pub type c_schar = i8;
pub type c_uchar = u8;
pub type c_short = i16;
pub type c_ushort = u16;
pub type c_int = i32;
pub type c_uint = u32;
pub type c_long = i32;
pub type c_ulong = u32;
pub type c_float = f32;
pub type c_double = f64;
pub type size_t = u32;
pub type ptrdiff_t = i32;
pub type clock_t = i32;
pub type time_t = i32;
pub type suseconds_t = i32;
pub type wchar_t = i32;
pub type c_longlong = i64;
pub type c_ulonglong = u64;
pub type intptr_t = i32;
pub type uintptr_t = u32;
pub type intmax_t = i64;
pub type uintmax_t = u64;
pub type off_t = i32;
pub type ino_t = u32;
pub type pid_t = i32;
pub type uid_t = u32;
pub type gid_t = u32;
pub type useconds_t = u32;
pub type off_t = i32;
pub type ssize_t = i32;
pub type blkcnt_t = i32;
pub type blksize_t = i32;
pub type dev_t = u64;
pub type mode_t = u32;
pub type nlink_t = u32;
......
//! AArch64-specific definitions for 64-bit linux-like values
pub type c_char = u8;
pub type nlink_t = u32;
pub type blksize_t = i32;
pub type c_char = u8;
pub type wchar_t = u32;
s! {
pub struct stat {
pub st_dev: dev_t,
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,
__pad1: dev_t,
pub st_size: off_t,
pub st_blksize: blksize_t,
__pad2: c_int,
pub st_blocks: blkcnt_t,
pub st_atime: time_t,
pub st_atime_nsec: c_long,
pub st_mtime: time_t,
pub st_mtime_nsec: c_long,
pub st_ctime: time_t,
pub st_ctime_nsec: c_long,
__unused: [c_int; 2],
pub st_dev: ::dev_t,
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,
__pad1: ::dev_t,
pub st_size: ::off_t,
pub st_blksize: ::blksize_t,
__pad2: ::c_int,
pub st_blocks: ::blkcnt_t,
pub st_atime: ::time_t,
pub st_atime_nsec: ::c_long,
pub st_mtime: ::time_t,
pub st_mtime_nsec: ::c_long,
pub st_ctime: ::time_t,
pub st_ctime_nsec: ::c_long,
__unused: [::c_int; 2],
}
pub struct pthread_attr_t {
......
//! 64-bit specific definitions for linux-like values
pub type c_schar = i8;
pub type c_uchar = u8;
pub type c_short = i16;
pub type c_ushort = u16;
pub type c_int = i32;
pub type c_uint = u32;
pub type c_long = i64;
pub type c_ulong = u64;
pub type c_float = f32;
pub type c_double = f64;
pub type size_t = u64;
pub type ptrdiff_t = i64;
pub type clock_t = i64;
pub type time_t = i64;
pub type suseconds_t = i64;
pub type c_longlong = i64;
pub type c_ulonglong = u64;
pub type intptr_t = i64;
pub type uintptr_t = u64;
pub type intmax_t = i64;
pub type uintmax_t = u64;
pub type off_t = i64;
pub type dev_t = u64;
pub type ino_t = u64;
pub type pid_t = i32;
pub type uid_t = u32;
pub type gid_t = u32;
pub type useconds_t = u32;
pub type off_t = i64;
pub type mode_t = u32;
pub type ssize_t = i64;
pub type blkcnt_t = i64;
......
//! x86_64-specific definitions for 64-bit linux-like values
pub type c_char = i8;
pub type nlink_t = u64;
pub type blksize_t = i64;
pub type c_char = i8;
pub type wchar_t = i32;
s! {
......
pub type c_schar = i8;
pub type c_uchar = u8;
pub type c_short = i16;
pub type c_ushort = u16;
pub type c_int = i32;
pub type c_uint = u32;
pub type c_float = f32;
pub type c_double = f64;
pub type c_longlong = i64;
pub type c_ulonglong = u64;
pub type intmax_t = i64;
pub type uintmax_t = u64;
pub type dev_t = u64;
pub type gid_t = u32;
pub type pid_t = i32;
pub type uid_t = u32;
pub type useconds_t = u32;
pub const RLIMIT_RSS: ::c_int = 5;
pub const RLIMIT_NOFILE: ::c_int = 7;
pub const RLIMIT_AS: ::c_int = 9;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment