]> git.lizzy.rs Git - rust.git/blob - library/std/src/os/emscripten/raw.rs
Auto merge of #94530 - tmiasko:alignment-impls, r=dtolnay
[rust.git] / library / std / src / 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 #![deprecated(
7     since = "1.8.0",
8     note = "these type aliases are no longer supported by \
9             the standard library, the `libc` crate on \
10             crates.io should be used instead for the correct \
11             definitions"
12 )]
13 #![allow(deprecated)]
14
15 use crate::os::raw::{c_long, c_short, c_uint, c_ulong};
16
17 #[stable(feature = "raw_ext", since = "1.1.0")]
18 pub type dev_t = u64;
19 #[stable(feature = "raw_ext", since = "1.1.0")]
20 pub type mode_t = u32;
21
22 #[stable(feature = "pthread_t", since = "1.8.0")]
23 pub type pthread_t = c_ulong;
24
25 #[stable(feature = "raw_ext", since = "1.1.0")]
26 pub type blkcnt_t = u64;
27 #[stable(feature = "raw_ext", since = "1.1.0")]
28 pub type blksize_t = u64;
29 #[stable(feature = "raw_ext", since = "1.1.0")]
30 pub type ino_t = u64;
31 #[stable(feature = "raw_ext", since = "1.1.0")]
32 pub type nlink_t = u64;
33 #[stable(feature = "raw_ext", since = "1.1.0")]
34 pub type off_t = u64;
35 #[stable(feature = "raw_ext", since = "1.1.0")]
36 pub type time_t = c_long;
37
38 #[repr(C)]
39 #[derive(Clone)]
40 #[stable(feature = "raw_ext", since = "1.1.0")]
41 pub struct stat {
42     #[stable(feature = "raw_ext", since = "1.1.0")]
43     pub st_dev: u64,
44     #[stable(feature = "raw_ext", since = "1.1.0")]
45     pub __pad1: c_short,
46     #[stable(feature = "raw_ext", since = "1.1.0")]
47     pub __st_ino: u32,
48     #[stable(feature = "raw_ext", since = "1.1.0")]
49     pub st_mode: u32,
50     #[stable(feature = "raw_ext", since = "1.1.0")]
51     pub st_nlink: u32,
52     #[stable(feature = "raw_ext", since = "1.1.0")]
53     pub st_uid: u32,
54     #[stable(feature = "raw_ext", since = "1.1.0")]
55     pub st_gid: u32,
56     #[stable(feature = "raw_ext", since = "1.1.0")]
57     pub st_rdev: u64,
58     #[stable(feature = "raw_ext", since = "1.1.0")]
59     pub __pad2: c_uint,
60     #[stable(feature = "raw_ext", since = "1.1.0")]
61     pub st_size: i64,
62     #[stable(feature = "raw_ext", since = "1.1.0")]
63     pub st_blksize: i32,
64     #[stable(feature = "raw_ext", since = "1.1.0")]
65     pub st_blocks: i64,
66     #[stable(feature = "raw_ext", since = "1.1.0")]
67     pub st_atime: time_t,
68     #[stable(feature = "raw_ext", since = "1.1.0")]
69     pub st_atime_nsec: c_long,
70     #[stable(feature = "raw_ext", since = "1.1.0")]
71     pub st_mtime: time_t,
72     #[stable(feature = "raw_ext", since = "1.1.0")]
73     pub st_mtime_nsec: c_long,
74     #[stable(feature = "raw_ext", since = "1.1.0")]
75     pub st_ctime: time_t,
76     #[stable(feature = "raw_ext", since = "1.1.0")]
77     pub st_ctime_nsec: c_long,
78     #[stable(feature = "raw_ext", since = "1.1.0")]
79     pub st_ino: u64,
80 }