]> git.proxmox.com Git - rustc.git/blob - src/libstd/os/redox/raw.rs
23d8ff7694bc5678eef7a94ec6f91e62f51dc9c0
[rustc.git] / src / libstd / os / redox / raw.rs
1 //! Redox-specific raw type definitions
2
3 #![stable(feature = "raw_ext", since = "1.1.0")]
4 #![rustc_deprecated(since = "1.8.0",
5 reason = "these type aliases are no longer supported by \
6 the standard library, the `libc` crate on \
7 crates.io should be used instead for the correct \
8 definitions")]
9 #![allow(deprecated)]
10 #![allow(missing_debug_implementations)]
11
12 use crate::os::raw::{c_char, c_int, c_long, c_ulong, c_void};
13
14 #[stable(feature = "raw_ext", since = "1.1.0")] pub type dev_t = c_long;
15 #[stable(feature = "raw_ext", since = "1.1.0")] pub type gid_t = c_int;
16 #[stable(feature = "raw_ext", since = "1.1.0")] pub type mode_t = c_int;
17 #[stable(feature = "raw_ext", since = "1.1.0")] pub type uid_t = c_int;
18
19 #[stable(feature = "pthread_t", since = "1.8.0")]
20 pub type pthread_t = *mut c_void;
21
22 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = c_ulong;
23 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = c_ulong;
24 #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = c_ulong;
25 #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = c_ulong;
26 #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = c_long;
27 #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = c_long;
28
29 #[repr(C)]
30 #[derive(Clone)]
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_ino: ino_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_mode: mode_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_size: off_t,
49 #[stable(feature = "raw_ext", since = "1.1.0")]
50 pub st_blksize: blksize_t,
51 #[stable(feature = "raw_ext", since = "1.1.0")]
52 pub st_blocks: blkcnt_t,
53 #[stable(feature = "raw_ext", since = "1.1.0")]
54 pub st_atime: time_t,
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: time_t,
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: time_t,
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 _pad: [c_char; 24],
67 }