|
| 1 | +pub type c_long = i32; |
| 2 | +pub type c_ulong = u32; |
| 3 | + |
| 4 | +pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32; |
| 5 | +pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24; |
| 6 | + |
| 7 | +pub const F_GETLK: ::c_int = 12; |
| 8 | +pub const F_SETLK: ::c_int = 13; |
| 9 | +pub const F_SETLKW: ::c_int = 14; |
| 10 | + |
| 11 | + |
| 12 | +s! { |
| 13 | + pub struct stat { |
| 14 | + pub st_dev: ::dev_t, |
| 15 | + __st_dev_padding: ::c_int, |
| 16 | + __st_ino_truncated: ::c_long, |
| 17 | + pub st_mode: ::mode_t, |
| 18 | + pub st_nlink: ::nlink_t, |
| 19 | + pub st_uid: ::uid_t, |
| 20 | + pub st_gid: ::gid_t, |
| 21 | + pub st_rdev: ::dev_t, |
| 22 | + __st_rdev_padding: ::c_int, |
| 23 | + pub st_size: ::off_t, |
| 24 | + pub st_blksize: ::blksize_t, |
| 25 | + pub st_blocks: ::blkcnt_t, |
| 26 | + pub st_atim: ::timespec, |
| 27 | + pub st_mtim: ::timespec, |
| 28 | + pub st_ctim: ::timespec, |
| 29 | + pub st_ino: ::ino_t, |
| 30 | + } |
| 31 | + |
| 32 | + pub struct stat64 { |
| 33 | + pub st_dev: ::dev_t, |
| 34 | + __st_dev_padding: ::c_int, |
| 35 | + __st_ino_truncated: ::c_long, |
| 36 | + pub st_mode: ::mode_t, |
| 37 | + pub st_nlink: ::nlink_t, |
| 38 | + pub st_uid: ::uid_t, |
| 39 | + pub st_gid: ::gid_t, |
| 40 | + pub st_rdev: ::dev_t, |
| 41 | + __st_rdev_padding: ::c_int, |
| 42 | + pub st_size: ::off_t, |
| 43 | + pub st_blksize: ::blksize_t, |
| 44 | + pub st_blocks: ::blkcnt_t, |
| 45 | + pub st_atim: ::timespec, |
| 46 | + pub st_mtim: ::timespec, |
| 47 | + pub st_ctim: ::timespec, |
| 48 | + pub st_ino: ::ino_t, |
| 49 | + } |
| 50 | + |
| 51 | + pub struct pthread_attr_t { |
| 52 | + __size: [u32; 9] |
| 53 | + } |
| 54 | + |
| 55 | + pub struct sigset_t { |
| 56 | + __val: [::c_ulong; 32], |
| 57 | + } |
| 58 | + |
| 59 | + pub struct shmid_ds { |
| 60 | + pub shm_perm: ::ipc_perm, |
| 61 | + pub shm_segsz: ::size_t, |
| 62 | + pub shm_atime: ::time_t, |
| 63 | + __unused1: ::c_int, |
| 64 | + pub shm_dtime: ::time_t, |
| 65 | + __unused2: ::c_int, |
| 66 | + pub shm_ctime: ::time_t, |
| 67 | + __unused3: ::c_int, |
| 68 | + pub shm_cpid: ::pid_t, |
| 69 | + pub shm_lpid: ::pid_t, |
| 70 | + pub shm_nattch: ::c_ulong, |
| 71 | + __pad1: ::c_ulong, |
| 72 | + __pad2: ::c_ulong, |
| 73 | + } |
| 74 | + |
| 75 | + pub struct msghdr { |
| 76 | + pub msg_name: *mut ::c_void, |
| 77 | + pub msg_namelen: ::socklen_t, |
| 78 | + pub msg_iov: *mut ::iovec, |
| 79 | + pub msg_iovlen: ::c_int, |
| 80 | + pub msg_control: *mut ::c_void, |
| 81 | + pub msg_controllen: ::socklen_t, |
| 82 | + pub msg_flags: ::c_int, |
| 83 | + } |
| 84 | +} |
| 85 | + |
| 86 | +cfg_if! { |
| 87 | + if #[cfg(any(target_arch = "x86"))] { |
| 88 | + mod x86; |
| 89 | + pub use self::x86::*; |
| 90 | + } else if #[cfg(any(target_arch = "arm"))] { |
| 91 | + mod arm; |
| 92 | + pub use self::arm::*; |
| 93 | + } else if #[cfg(any(target_arch = "asmjs"))] { |
| 94 | + mod asmjs; |
| 95 | + pub use self::asmjs::*; |
| 96 | + } else { } |
| 97 | +} |
0 commit comments