]> git.lizzy.rs Git - rust.git/blob - src/libstd/os/emscripten/raw.rs
Rollup merge of #58802 - nnethercote:inline-record_layout, r=oli-obk
[rust.git] / src / libstd / os / emscripten / raw.rs
1 //! Emscripten-specific raw type definitions
2 //! This is basically exactly the same as the linux definitions,
3 //! except using the musl-specific stat64 structure in liblibc.
4
5 #![stable(feature = "raw_ext", since = "1.1.0")]
6 #![rustc_deprecated(since = "1.8.0",
7                     reason = "these type aliases are no longer supported by \
8                               the standard library, the `libc` crate on \
9                               crates.io should be used instead for the correct \
10                               definitions")]
11 #![allow(deprecated)]
12
13 use crate::os::raw::{c_long, c_short, c_uint, c_ulong};
14
15 #[stable(feature = "raw_ext", since = "1.1.0")] pub type dev_t = u64;
16 #[stable(feature = "raw_ext", since = "1.1.0")] pub type mode_t = u32;
17
18 #[stable(feature = "pthread_t", since = "1.8.0")]
19 pub type pthread_t = c_ulong;
20
21 #[doc(inline)]
22 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = u64;
23 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = u64;
24 #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64;
25 #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u64;
26 #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64;
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: u64,
35     #[stable(feature = "raw_ext", since = "1.1.0")]
36     pub __pad1: c_short,
37     #[stable(feature = "raw_ext", since = "1.1.0")]
38     pub __st_ino: u32,
39     #[stable(feature = "raw_ext", since = "1.1.0")]
40     pub st_mode: u32,
41     #[stable(feature = "raw_ext", since = "1.1.0")]
42     pub st_nlink: u32,
43     #[stable(feature = "raw_ext", since = "1.1.0")]
44     pub st_uid: u32,
45     #[stable(feature = "raw_ext", since = "1.1.0")]
46     pub st_gid: u32,
47     #[stable(feature = "raw_ext", since = "1.1.0")]
48     pub st_rdev: u64,
49     #[stable(feature = "raw_ext", since = "1.1.0")]
50     pub __pad2: c_uint,
51     #[stable(feature = "raw_ext", since = "1.1.0")]
52     pub st_size: i64,
53     #[stable(feature = "raw_ext", since = "1.1.0")]
54     pub st_blksize: i32,
55     #[stable(feature = "raw_ext", since = "1.1.0")]
56     pub st_blocks: i64,
57     #[stable(feature = "raw_ext", since = "1.1.0")]
58     pub st_atime: time_t,
59     #[stable(feature = "raw_ext", since = "1.1.0")]
60     pub st_atime_nsec: c_long,
61     #[stable(feature = "raw_ext", since = "1.1.0")]
62     pub st_mtime: time_t,
63     #[stable(feature = "raw_ext", since = "1.1.0")]
64     pub st_mtime_nsec: c_long,
65     #[stable(feature = "raw_ext", since = "1.1.0")]
66     pub st_ctime: time_t,
67     #[stable(feature = "raw_ext", since = "1.1.0")]
68     pub st_ctime_nsec: c_long,
69     #[stable(feature = "raw_ext", since = "1.1.0")]
70     pub st_ino: u64,
71 }