|
1 | 1 | use crate::off_t; |
2 | 2 | use crate::prelude::*; |
3 | 3 |
|
| 4 | +#[deprecated( |
| 5 | + since = "0.2.187", |
| 6 | + note = "This type doesn't exist. The Fuchsia SDK doesn't ship it." |
| 7 | +)] |
4 | 8 | pub type __u64 = c_ulonglong; |
5 | | -pub type wchar_t = u32; |
6 | | -pub type nlink_t = c_ulong; |
7 | | -pub type blksize_t = c_long; |
8 | 9 |
|
9 | 10 | s! { |
10 | 11 | pub struct stat { |
|
15 | 16 | pub st_uid: crate::uid_t, |
16 | 17 | pub st_gid: crate::gid_t, |
17 | 18 | pub st_rdev: crate::dev_t, |
18 | | - __pad0: Padding<c_ulong>, |
| 19 | + __pad: Padding<c_ulong>, |
19 | 20 | pub st_size: off_t, |
20 | 21 | pub st_blksize: crate::blksize_t, |
21 | | - __pad1: Padding<c_int>, |
| 22 | + __pad2: Padding<c_int>, |
22 | 23 | pub st_blocks: crate::blkcnt_t, |
23 | | - pub st_atime: crate::time_t, |
24 | | - pub st_atime_nsec: c_long, |
25 | | - pub st_mtime: crate::time_t, |
26 | | - pub st_mtime_nsec: c_long, |
27 | | - pub st_ctime: crate::time_t, |
28 | | - pub st_ctime_nsec: c_long, |
29 | | - __unused: Padding<[c_uint; 2]>, |
| 24 | + pub st_atim: crate::timespec, |
| 25 | + pub st_mtim: crate::timespec, |
| 26 | + pub st_ctim: crate::timespec, |
| 27 | + __unused1: Padding<[c_uint; 2]>, |
30 | 28 | } |
31 | 29 |
|
| 30 | + #[deprecated( |
| 31 | + since = "0.2.187", |
| 32 | + note = "This type doesn't exist. It's not part of the Fuchsia SDK." |
| 33 | + )] |
32 | 34 | pub struct stat64 { |
33 | 35 | pub st_dev: crate::dev_t, |
34 | 36 | pub st_ino: crate::ino_t, |
|
51 | 53 | __unused: Padding<[c_uint; 2]>, |
52 | 54 | } |
53 | 55 |
|
| 56 | + #[deprecated( |
| 57 | + since = "0.2.187", |
| 58 | + note = "This type doesn't exist. It's not part of the Fuchsia SDK." |
| 59 | + )] |
54 | 60 | pub struct ipc_perm { |
55 | 61 | pub __ipc_perm_key: crate::key_t, |
56 | 62 | pub uid: crate::uid_t, |
|
62 | 68 | __unused1: Padding<c_ulong>, |
63 | 69 | __unused2: Padding<c_ulong>, |
64 | 70 | } |
| 71 | + |
| 72 | + // FIXME(i128): __reserved is meant to be an array of `long double`s. That |
| 73 | + // requires native support for `i128`. This is currently missing. |
| 74 | + pub struct mcontext_t { |
| 75 | + pub fault_address: c_ulong, |
| 76 | + pub regs: [c_ulong; 31], |
| 77 | + pub sp: c_ulong, |
| 78 | + pub pc: c_ulong, |
| 79 | + pub pstate: c_ulong, |
| 80 | + __reserved: Padding<[c_longlong; 256]>, |
| 81 | + } |
| 82 | + |
| 83 | + pub struct ucontext_t { |
| 84 | + pub uc_flags: c_ulong, |
| 85 | + pub uc_link: *mut crate::ucontext_t, |
| 86 | + pub uc_stack: crate::stack_t, |
| 87 | + pub uc_sigmask: crate::sigset_t, |
| 88 | + pub uc_mcontext: crate::mcontext_t, |
| 89 | + } |
65 | 90 | } |
66 | 91 |
|
67 | 92 | // From https://cs.opensource.google/fuchsia/fuchsia/+/main:zircon/third_party/ulib/musl/include/bits/signal.h;l=20-21;drc=0827b18ab9540c46f8037f407d17ea15a79e9ba7 |
|
0 commit comments