diff options
author | Jeremy Soller <jackpot51@gmail.com> | 2017-09-19 19:13:27 -0600 |
---|---|---|
committer | Jeremy Soller <jackpot51@gmail.com> | 2017-09-19 19:13:27 -0600 |
commit | d18565cf6fbfedaa12b7d0046f50e73d7aa5343e (patch) | |
tree | 8af29ff3bcbb27b877a608f1b080ea423fcf1c4b | |
parent | 75b5c293322bf2dace86e14a4296095fc4f47752 (diff) | |
download | rust-libc-d18565cf6fbfedaa12b7d0046f50e73d7aa5343e.tar.gz |
Fix style
-rw-r--r-- | src/redox/mod.rs | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/redox/mod.rs b/src/redox/mod.rs index 0d3e5fff96..82b296f965 100644 --- a/src/redox/mod.rs +++ b/src/redox/mod.rs @@ -1,7 +1,3 @@ -pub use self::net::*; - -mod net; - pub type c_char = i8; pub type c_long = i64; pub type c_ulong = u64; @@ -17,6 +13,18 @@ pub type uid_t = usize; pub type suseconds_t = i64; +s! { + pub struct timeval { + pub tv_sec: time_t, + pub tv_usec: suseconds_t, + } + + pub struct timespec { + pub tv_sec: time_t, + pub tv_nsec: c_long, + } +} + pub const STDIN_FILENO: ::c_int = 0; pub const STDOUT_FILENO: ::c_int = 1; pub const STDERR_FILENO: ::c_int = 2; @@ -77,18 +85,6 @@ pub const O_SYMLINK: ::c_int = 0x4000_0000; pub const O_NOFOLLOW: ::c_int = 0x8000_0000; pub const O_ACCMODE: ::c_int = O_RDONLY | O_WRONLY | O_RDWR; -s! { - pub struct timeval { - pub tv_sec: time_t, - pub tv_usec: suseconds_t, - } - - pub struct timespec { - pub tv_sec: time_t, - pub tv_nsec: c_long, - } -} - extern { pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void; pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::size_t) @@ -102,3 +98,7 @@ extern { #[link(name = "c")] #[link(name = "m")] extern {} + +pub use self::net::*; + +mod net; |