]> git.lizzy.rs Git - rust.git/blob - src/libstd/os/macos/raw.rs
add inline attributes to stage 0 methods
[rust.git] / src / libstd / os / macos / raw.rs
1 // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 //! MacOS-specific raw type definitions
12
13 #![stable(feature = "raw_ext", since = "1.1.0")]
14 #![rustc_deprecated(since = "1.8.0",
15                     reason = "these type aliases are no longer supported by \
16                               the standard library, the `libc` crate on \
17                               crates.io should be used instead for the correct \
18                               definitions")]
19 #![allow(deprecated)]
20
21 use os::raw::c_long;
22
23 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = u64;
24 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = u64;
25 #[stable(feature = "raw_ext", since = "1.1.0")] pub type dev_t = u64;
26 #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64;
27 #[stable(feature = "raw_ext", since = "1.1.0")] pub type mode_t = u32;
28 #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u64;
29 #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64;
30 #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
31
32 #[stable(feature = "pthread_t", since = "1.8.0")]
33 pub type pthread_t = usize;
34
35 #[repr(C)]
36 #[derive(Clone)]
37 #[stable(feature = "raw_ext", since = "1.1.0")]
38 pub struct stat {
39     #[stable(feature = "raw_ext", since = "1.1.0")]
40     pub st_dev: i32,
41     #[stable(feature = "raw_ext", since = "1.1.0")]
42     pub st_mode: u16,
43     #[stable(feature = "raw_ext", since = "1.1.0")]
44     pub st_nlink: u16,
45     #[stable(feature = "raw_ext", since = "1.1.0")]
46     pub st_ino: u64,
47     #[stable(feature = "raw_ext", since = "1.1.0")]
48     pub st_uid: u32,
49     #[stable(feature = "raw_ext", since = "1.1.0")]
50     pub st_gid: u32,
51     #[stable(feature = "raw_ext", since = "1.1.0")]
52     pub st_rdev: i32,
53     #[stable(feature = "raw_ext", since = "1.1.0")]
54     pub st_atime: c_long,
55     #[stable(feature = "raw_ext", since = "1.1.0")]
56     pub st_atime_nsec: c_long,
57     #[stable(feature = "raw_ext", since = "1.1.0")]
58     pub st_mtime: c_long,
59     #[stable(feature = "raw_ext", since = "1.1.0")]
60     pub st_mtime_nsec: c_long,
61     #[stable(feature = "raw_ext", since = "1.1.0")]
62     pub st_ctime: c_long,
63     #[stable(feature = "raw_ext", since = "1.1.0")]
64     pub st_ctime_nsec: c_long,
65     #[stable(feature = "raw_ext", since = "1.1.0")]
66     pub st_birthtime: c_long,
67     #[stable(feature = "raw_ext", since = "1.1.0")]
68     pub st_birthtime_nsec: c_long,
69     #[stable(feature = "raw_ext", since = "1.1.0")]
70     pub st_size: i64,
71     #[stable(feature = "raw_ext", since = "1.1.0")]
72     pub st_blocks: i64,
73     #[stable(feature = "raw_ext", since = "1.1.0")]
74     pub st_blksize: i32,
75     #[stable(feature = "raw_ext", since = "1.1.0")]
76     pub st_flags: u32,
77     #[stable(feature = "raw_ext", since = "1.1.0")]
78     pub st_gen: u32,
79     #[stable(feature = "raw_ext", since = "1.1.0")]
80     pub st_lspare: i32,
81     #[stable(feature = "raw_ext", since = "1.1.0")]
82     pub st_qspare: [i64; 2],
83 }