]>
Commit | Line | Data |
---|---|---|
7453a54e SL |
1 | pub type c_long = i32; |
2 | pub type c_ulong = u32; | |
3 | pub type nlink_t = u32; | |
4 | ||
7453a54e SL |
5 | s! { |
6 | pub struct pthread_attr_t { | |
7 | __size: [u32; 9] | |
8 | } | |
9 | ||
10 | pub struct sigset_t { | |
11 | __val: [::c_ulong; 32], | |
12 | } | |
13 | ||
14 | pub struct msghdr { | |
15 | pub msg_name: *mut ::c_void, | |
16 | pub msg_namelen: ::socklen_t, | |
17 | pub msg_iov: *mut ::iovec, | |
18 | pub msg_iovlen: ::c_int, | |
19 | pub msg_control: *mut ::c_void, | |
20 | pub msg_controllen: ::socklen_t, | |
21 | pub msg_flags: ::c_int, | |
22 | } | |
23 | } | |
24 | ||
54a0048b SL |
25 | pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32; |
26 | pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24; | |
27 | ||
7453a54e SL |
28 | cfg_if! { |
29 | if #[cfg(any(target_arch = "x86"))] { | |
30 | mod x86; | |
31 | pub use self::x86::*; | |
32 | } else if #[cfg(any(target_arch = "mips"))] { | |
33 | mod mips; | |
34 | pub use self::mips::*; | |
35 | } else if #[cfg(any(target_arch = "arm"))] { | |
36 | mod arm; | |
37 | pub use self::arm::*; | |
38 | } else if #[cfg(any(target_arch = "asmjs"))] { | |
39 | mod asmjs; | |
40 | pub use self::asmjs::*; | |
54a0048b SL |
41 | } else { |
42 | // Unknown target_arch | |
43 | } | |
7453a54e | 44 | } |