11use  crate :: prelude:: * ; 
22
3- cfg_if !  { 
4-     if  #[ cfg( not( target_arch = "wasm32" ) ) ]  { 
5-         pub  type  c_long = i32 ; 
6-         pub  type  c_ulong = u32 ; 
7-         pub  type  nlink_t = u32 ; 
8-         pub  type  blksize_t = c_long; 
9-         pub  type  __u64 = c_ulonglong; 
10-         pub  type  __s64 = c_longlong; 
11-         pub  type  regoff_t = c_int; 
12- 
13-         s! { 
14-             pub  struct  pthread_attr_t { 
15-                 __size:  [ u32 ;  9 ] , 
16-             } 
17- 
18-             pub  struct  sigset_t { 
19-                 __val:  [ c_ulong;  32 ] , 
20-             } 
21- 
22-             pub  struct  msghdr { 
23-                 pub  msg_name:  * mut  c_void, 
24-                 pub  msg_namelen:  crate :: socklen_t, 
25-                 pub  msg_iov:  * mut  crate :: iovec, 
26-                 pub  msg_iovlen:  c_int, 
27-                 pub  msg_control:  * mut  c_void, 
28-                 pub  msg_controllen:  crate :: socklen_t, 
29-                 pub  msg_flags:  c_int, 
30-             } 
31- 
32-             pub  struct  cmsghdr { 
33-                 pub  cmsg_len:  crate :: socklen_t, 
34-                 pub  cmsg_level:  c_int, 
35-                 pub  cmsg_type:  c_int, 
36-             } 
37- 
38-             pub  struct  sem_t { 
39-                 __val:  [ c_int;  4 ] , 
40-             } 
41-         } 
42- 
43-         pub  const  __SIZEOF_PTHREAD_RWLOCK_T:  usize  = 32 ; 
44-         pub  const  __SIZEOF_PTHREAD_MUTEX_T:  usize  = 24 ; 
45-         pub  const  __SIZEOF_PTHREAD_BARRIER_T:  usize  = 20 ; 
3+ pub  type  c_long  = i32 ; 
4+ pub  type  c_ulong  = u32 ; 
5+ pub  type  nlink_t  = u32 ; 
6+ pub  type  blksize_t  = c_long ; 
7+ pub  type  __u64  = c_ulonglong ; 
8+ pub  type  __s64  = c_longlong ; 
9+ pub  type  regoff_t  = c_int ; 
10+ 
11+ s !  { 
12+     pub  struct  pthread_attr_t { 
13+         __size:  [ u32 ;  9 ] , 
4614    } 
47-     else { 
48-         pub  type  c_long = i64 ; 
49-         pub  type  c_ulong = u64 ; 
50-         pub  type  regoff_t = c_long; 
51- 
52-         s! { 
53-             pub  struct  stack_t { 
54-                 pub  ss_sp:  * mut  c_void, 
55-                 pub  ss_flags:  c_int, 
56-                 pub  ss_size:  size_t, 
57-             } 
5815
59-             pub  struct  pthread_attr_t { 
60-                 __size:  [ u64 ;  7 ] , 
61-             } 
62- 
63-             pub  struct  sigset_t { 
64-                 __val:  [ c_ulong;  16 ] , 
65-             } 
66- 
67-             pub  struct  shmid_ds { 
68-                 pub  shm_perm:  crate :: ipc_perm, 
69-                 pub  shm_segsz:  size_t, 
70-                 pub  shm_atime:  crate :: time_t, 
71-                 pub  shm_dtime:  crate :: time_t, 
72-                 pub  shm_ctime:  crate :: time_t, 
73-                 pub  shm_cpid:  crate :: pid_t, 
74-                 pub  shm_lpid:  crate :: pid_t, 
75-                 pub  shm_nattch:  c_ulong, 
76-                 __pad1:  c_ulong, 
77-                 __pad2:  c_ulong, 
78-             } 
79- 
80-             pub  struct  msqid_ds { 
81-                 pub  msg_perm:  crate :: ipc_perm, 
82-                 pub  msg_stime:  crate :: time_t, 
83-                 pub  msg_rtime:  crate :: time_t, 
84-                 pub  msg_ctime:  crate :: time_t, 
85-                 __msg_cbytes:  c_ulong, 
86-                 pub  msg_qnum:  crate :: msgqnum_t, 
87-                 pub  msg_qbytes:  crate :: msglen_t, 
88-                 pub  msg_lspid:  crate :: pid_t, 
89-                 pub  msg_lrpid:  crate :: pid_t, 
90-                 __pad1:  c_ulong, 
91-                 __pad2:  c_ulong, 
92-             } 
93- 
94-             pub  struct  msghdr { 
95-                 pub  msg_name:  * mut  c_void, 
96-                 pub  msg_namelen:  crate :: socklen_t, 
97-                 pub  msg_iov:  * mut  crate :: iovec, 
98-                 #[ cfg( target_endian = "big" ) ] 
99-                 __pad1:  c_int, 
100-                 pub  msg_iovlen:  c_int, 
101-                 #[ cfg( target_endian = "little" ) ] 
102-                 __pad1:  c_int, 
103-                 pub  msg_control:  * mut  c_void, 
104-                 #[ cfg( target_endian = "big" ) ] 
105-                 __pad2:  c_int, 
106-                 pub  msg_controllen:  crate :: socklen_t, 
107-                 #[ cfg( target_endian = "little" ) ] 
108-                 __pad2:  c_int, 
109-                 pub  msg_flags:  c_int, 
110-             } 
16+     pub  struct  sigset_t { 
17+         __val:  [ c_ulong;  32 ] , 
18+     } 
11119
112-              pub  struct  cmsghdr  { 
113-                 # [ cfg ( target_endian =  "big" ) ] 
114-                  pub  __pad1 :  c_int , 
115-                  pub  cmsg_len :   crate :: socklen_t , 
116-                 # [ cfg ( target_endian =  "little" ) ] 
117-                  pub  __pad1 :  c_int , 
118-                  pub  cmsg_level :  c_int , 
119-                  pub  cmsg_type :  c_int, 
120-              } 
20+     pub  struct  msghdr  { 
21+         pub  msg_name :   * mut  c_void , 
22+         pub  msg_namelen :   crate :: socklen_t , 
23+         pub  msg_iov :   * mut   crate :: iovec , 
24+         pub  msg_iovlen :  c_int , 
25+         pub  msg_control :   * mut  c_void , 
26+         pub  msg_controllen :   crate :: socklen_t , 
27+         pub  msg_flags :  c_int, 
28+     } 
12129
122-             pub  struct  sem_t { 
123-                 __val:  [ c_int;  8 ] , 
124-             } 
125-         } 
126-         pub  const  __SIZEOF_PTHREAD_RWLOCK_T:  usize  = 56 ; 
127-         pub  const  __SIZEOF_PTHREAD_MUTEX_T:  usize  = 40 ; 
128-         pub  const  __SIZEOF_PTHREAD_BARRIER_T:  usize  = 32 ; 
30+     pub  struct  cmsghdr { 
31+         pub  cmsg_len:  crate :: socklen_t, 
32+         pub  cmsg_level:  c_int, 
33+         pub  cmsg_type:  c_int, 
34+     } 
12935
130-         extern "C"  { 
131-             pub  fn  getrandom( buf:  * mut  c_void,  buflen:  size_t,  flags:  c_uint)  -> ssize_t; 
132-         } 
36+     pub  struct  sem_t { 
37+         __val:  [ c_int;  4 ] , 
13338    } 
13439} 
13540
41+ pub  const  __SIZEOF_PTHREAD_RWLOCK_T:  usize  = 32 ; 
42+ pub  const  __SIZEOF_PTHREAD_MUTEX_T:  usize  = 24 ; 
43+ pub  const  __SIZEOF_PTHREAD_BARRIER_T:  usize  = 20 ; 
44+ 
13645cfg_if !  { 
13746    if  #[ cfg( any( target_arch = "x86" ) ) ]  { 
13847        mod  x86; 
@@ -152,9 +61,6 @@ cfg_if! {
15261    }  else if  #[ cfg( any( target_arch = "riscv32" ) ) ]  { 
15362        mod  riscv32; 
15463        pub  use  self :: riscv32:: * ; 
155-     }  else if  #[ cfg( any( target_arch = "wasm32" ) ) ]  { 
156-         mod  wasm32; 
157-         pub  use  self :: wasm32:: * ; 
15864    }  else { 
15965        // Unknown target_arch 
16066    } 
0 commit comments