]> git.lizzy.rs Git - rust.git/blob - library/std/src/os/redox/raw.rs
Rollup merge of #96882 - jackh726:no-subst, r=oli-obk
[rust.git] / library / std / src / os / redox / raw.rs
1 //! Redox-specific raw type definitions
2
3 #![stable(feature = "raw_ext", since = "1.1.0")]
4 #![deprecated(
5     since = "1.8.0",
6     note = "these type aliases are no longer supported by \
7             the standard library, the `libc` crate on \
8             crates.io should be used instead for the correct \
9             definitions"
10 )]
11 #![allow(deprecated)]
12
13 use crate::os::raw::{c_char, c_int, c_long, c_ulong, c_void};
14
15 #[stable(feature = "raw_ext", since = "1.1.0")]
16 pub type dev_t = c_long;
17 #[stable(feature = "raw_ext", since = "1.1.0")]
18 pub type gid_t = c_int;
19 #[stable(feature = "raw_ext", since = "1.1.0")]
20 pub type mode_t = c_int;
21 #[stable(feature = "raw_ext", since = "1.1.0")]
22 pub type uid_t = c_int;
23
24 #[stable(feature = "pthread_t", since = "1.8.0")]
25 pub type pthread_t = *mut c_void;
26
27 #[stable(feature = "raw_ext", since = "1.1.0")]
28 pub type blkcnt_t = c_ulong;
29 #[stable(feature = "raw_ext", since = "1.1.0")]
30 pub type blksize_t = c_ulong;
31 #[stable(feature = "raw_ext", since = "1.1.0")]
32 pub type ino_t = c_ulong;
33 #[stable(feature = "raw_ext", since = "1.1.0")]
34 pub type nlink_t = c_ulong;
35 #[stable(feature = "raw_ext", since = "1.1.0")]
36 pub type off_t = c_long;
37 #[stable(feature = "raw_ext", since = "1.1.0")]
38 pub type time_t = c_long;
39
40 #[repr(C)]
41 #[derive(Clone)]
42 #[stable(feature = "raw_ext", since = "1.1.0")]
43 pub struct stat {
44     #[stable(feature = "raw_ext", since = "1.1.0")]
45     pub st_dev: dev_t,
46     #[stable(feature = "raw_ext", since = "1.1.0")]
47     pub st_ino: ino_t,
48     #[stable(feature = "raw_ext", since = "1.1.0")]
49     pub st_nlink: nlink_t,
50     #[stable(feature = "raw_ext", since = "1.1.0")]
51     pub st_mode: mode_t,
52     #[stable(feature = "raw_ext", since = "1.1.0")]
53     pub st_uid: uid_t,
54     #[stable(feature = "raw_ext", since = "1.1.0")]
55     pub st_gid: gid_t,
56     #[stable(feature = "raw_ext", since = "1.1.0")]
57     pub st_rdev: dev_t,
58     #[stable(feature = "raw_ext", since = "1.1.0")]
59     pub st_size: off_t,
60     #[stable(feature = "raw_ext", since = "1.1.0")]
61     pub st_blksize: blksize_t,
62     #[stable(feature = "raw_ext", since = "1.1.0")]
63     pub st_blocks: blkcnt_t,
64     #[stable(feature = "raw_ext", since = "1.1.0")]
65     pub st_atime: time_t,
66     #[stable(feature = "raw_ext", since = "1.1.0")]
67     pub st_atime_nsec: c_long,
68     #[stable(feature = "raw_ext", since = "1.1.0")]
69     pub st_mtime: time_t,
70     #[stable(feature = "raw_ext", since = "1.1.0")]
71     pub st_mtime_nsec: c_long,
72     #[stable(feature = "raw_ext", since = "1.1.0")]
73     pub st_ctime: time_t,
74     #[stable(feature = "raw_ext", since = "1.1.0")]
75     pub st_ctime_nsec: c_long,
76     #[stable(feature = "raw_ext", since = "1.1.0")]
77     pub _pad: [c_char; 24],
78 }