]>
Commit | Line | Data |
---|---|---|
d9579d0f AL |
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 | ||
15 | use os::raw::c_long; | |
16 | use os::unix::raw::{uid_t, gid_t}; | |
17 | ||
18 | #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = i64; | |
19 | #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = i32; | |
20 | #[stable(feature = "raw_ext", since = "1.1.0")] pub type dev_t = i32; | |
21 | #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64; | |
22 | #[stable(feature = "raw_ext", since = "1.1.0")] pub type mode_t = u16; | |
23 | #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u16; | |
24 | #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i64; | |
25 | #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = c_long; | |
26 | ||
92a42be0 SL |
27 | #[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize; |
28 | ||
d9579d0f | 29 | #[repr(C)] |
b039eaaf | 30 | #[derive(Clone)] |
d9579d0f AL |
31 | #[stable(feature = "raw_ext", since = "1.1.0")] |
32 | pub struct stat { | |
33 | #[stable(feature = "raw_ext", since = "1.1.0")] | |
34 | pub st_dev: dev_t, | |
35 | #[stable(feature = "raw_ext", since = "1.1.0")] | |
36 | pub st_mode: mode_t, | |
37 | #[stable(feature = "raw_ext", since = "1.1.0")] | |
38 | pub st_nlink: nlink_t, | |
39 | #[stable(feature = "raw_ext", since = "1.1.0")] | |
40 | pub st_ino: ino_t, | |
41 | #[stable(feature = "raw_ext", since = "1.1.0")] | |
42 | pub st_uid: uid_t, | |
43 | #[stable(feature = "raw_ext", since = "1.1.0")] | |
44 | pub st_gid: gid_t, | |
45 | #[stable(feature = "raw_ext", since = "1.1.0")] | |
46 | pub st_rdev: dev_t, | |
47 | #[stable(feature = "raw_ext", since = "1.1.0")] | |
48 | pub st_atime: time_t, | |
49 | #[stable(feature = "raw_ext", since = "1.1.0")] | |
50 | pub st_atime_nsec: c_long, | |
51 | #[stable(feature = "raw_ext", since = "1.1.0")] | |
52 | pub st_mtime: time_t, | |
53 | #[stable(feature = "raw_ext", since = "1.1.0")] | |
54 | pub st_mtime_nsec: c_long, | |
55 | #[stable(feature = "raw_ext", since = "1.1.0")] | |
56 | pub st_ctime: time_t, | |
57 | #[stable(feature = "raw_ext", since = "1.1.0")] | |
58 | pub st_ctime_nsec: c_long, | |
59 | #[stable(feature = "raw_ext", since = "1.1.0")] | |
60 | pub st_birthtime: time_t, | |
61 | #[stable(feature = "raw_ext", since = "1.1.0")] | |
62 | pub st_birthtime_nsec: c_long, | |
63 | #[stable(feature = "raw_ext", since = "1.1.0")] | |
64 | pub st_size: off_t, | |
65 | #[stable(feature = "raw_ext", since = "1.1.0")] | |
66 | pub st_blocks: blkcnt_t, | |
67 | #[stable(feature = "raw_ext", since = "1.1.0")] | |
68 | pub st_blksize: blksize_t, | |
69 | #[stable(feature = "raw_ext", since = "1.1.0")] | |
70 | pub st_flags: u32, | |
71 | #[stable(feature = "raw_ext", since = "1.1.0")] | |
72 | pub st_gen: u32, | |
73 | #[stable(feature = "raw_ext", since = "1.1.0")] | |
74 | pub st_lspare: i32, | |
75 | #[stable(feature = "raw_ext", since = "1.1.0")] | |
76 | pub st_qspare: [i64; 2], | |
77 | } |