From 918f8e17f83a7eb58391525969bcb25362e8937f Mon Sep 17 00:00:00 2001 From: Alex Crichton <alex@alexcrichton.com> Date: Tue, 15 Sep 2015 16:39:51 -0700 Subject: [PATCH] Move common linux defn's up --- src/unix/notbsd/linux/mips.rs | 17 ----------------- src/unix/notbsd/linux/mod.rs | 19 +++++++++++++++++++ src/unix/notbsd/linux/notmips/mod.rs | 17 ----------------- 3 files changed, 19 insertions(+), 34 deletions(-) diff --git a/src/unix/notbsd/linux/mips.rs b/src/unix/notbsd/linux/mips.rs index 83ee1da0..75125d4c 100644 --- a/src/unix/notbsd/linux/mips.rs +++ b/src/unix/notbsd/linux/mips.rs @@ -1,36 +1,19 @@ 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 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; diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs index 049fd8e9..8d032847 100644 --- a/src/unix/notbsd/linux/mod.rs +++ b/src/unix/notbsd/linux/mod.rs @@ -1,5 +1,24 @@ //! Linux-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_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; + s! { pub struct glob_t { pub gl_pathc: size_t, diff --git a/src/unix/notbsd/linux/notmips/mod.rs b/src/unix/notbsd/linux/notmips/mod.rs index 0ddaa489..3b3109c0 100644 --- a/src/unix/notbsd/linux/notmips/mod.rs +++ b/src/unix/notbsd/linux/notmips/mod.rs @@ -1,20 +1,3 @@ -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; -- GitLab