From 684c4574c09a6f2cc5a208e4505e9306602b4abc Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Mon, 29 May 2017 14:07:12 -0700 Subject: Update libc crate to 0.2.23 The 'libc' create got a couple of updates. This change imports the new code and bumps the version to use. Import subrepo libc/:libc at 7db3fd570dfb41a38fb17116e93679307178103a --- libc/src/unix/notbsd/android/mod.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'libc/src/unix/notbsd/android/mod.rs') diff --git a/libc/src/unix/notbsd/android/mod.rs b/libc/src/unix/notbsd/android/mod.rs index cd20cb1..547d832 100644 --- a/libc/src/unix/notbsd/android/mod.rs +++ b/libc/src/unix/notbsd/android/mod.rs @@ -464,7 +464,6 @@ pub const TCSBRKP: ::c_int = 0x5425; pub const TCSANOW: ::c_int = 0; pub const TCSADRAIN: ::c_int = 0x1; pub const TCSAFLUSH: ::c_int = 0x2; -pub const IUTF8: ::tcflag_t = 0x00004000; pub const VEOF: usize = 4; pub const VEOL: usize = 11; pub const VEOL2: usize = 16; @@ -585,6 +584,7 @@ pub const MCL_CURRENT: ::c_int = 0x0001; pub const MCL_FUTURE: ::c_int = 0x0002; pub const SIGSTKSZ: ::size_t = 8192; +pub const MINSIGSTKSZ: ::size_t = 2048; pub const CBAUD: ::tcflag_t = 0o0010017; pub const TAB1: ::c_int = 0x00000800; pub const TAB2: ::c_int = 0x00001000; @@ -753,6 +753,17 @@ f! { pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool { set1.__bits == set2.__bits } + pub fn major(dev: ::dev_t) -> ::c_int { + ((dev >> 8) & 0xfff) as ::c_int + } + pub fn minor(dev: ::dev_t) -> ::c_int { + ((dev & 0xff) | ((dev >> 12) & 0xfff00)) as ::c_int + } + pub fn makedev(ma: ::c_int, mi: ::c_int) -> ::dev_t { + let ma = ma as ::dev_t; + let mi = mi as ::dev_t; + ((ma & 0xfff) << 8) | (mi & 0xff) | ((mi & 0xfff00) << 12) + } } extern { -- cgit v1.2.1