@@ -140,74 +140,128 @@ s! {
140
140
}
141
141
}
142
142
143
- pub const O_NOATIME : :: c_int = 0o1000000 ;
144
- pub const O_PATH : :: c_int = 0o10000000 ;
145
- pub const O_TMPFILE : :: c_int = 0o20000000 | O_DIRECTORY ;
146
-
147
143
pub const SO_PRIORITY : :: c_int = 12 ;
148
144
pub const SO_BSDCOMPAT : :: c_int = 14 ;
149
- pub const SO_BINDTODEVICE : :: c_int = 25 ;
150
145
pub const SO_TIMESTAMP : :: c_int = 29 ;
151
- pub const SO_MARK : :: c_int = 36 ;
152
- pub const SO_RXQ_OVFL : :: c_int = 40 ;
153
- pub const SO_PEEK_OFF : :: c_int = 42 ;
154
- pub const SO_BUSY_POLL : :: c_int = 46 ;
155
-
156
- pub const SA_ONSTACK : :: c_int = 0x08000000 ;
157
146
158
- pub const PTRACE_DETACH : :: c_uint = 17 ;
159
147
pub const POSIX_FADV_DONTNEED : :: c_int = 4 ;
160
148
pub const POSIX_FADV_NOREUSE : :: c_int = 5 ;
161
149
162
- pub const F_SETLK : :: c_int = 6 ;
163
- pub const F_SETLKW : :: c_int = 7 ;
164
-
165
- pub const F_RDLCK : :: c_int = 0 ;
166
- pub const F_WRLCK : :: c_int = 1 ;
167
- pub const F_UNLCK : :: c_int = 2 ;
168
-
169
150
pub const F_OFD_GETLK : :: c_int = 36 ;
170
151
pub const F_OFD_SETLK : :: c_int = 37 ;
171
152
pub const F_OFD_SETLKW : :: c_int = 38 ;
172
153
173
- pub const SFD_CLOEXEC : :: c_int = 0x080000 ;
174
-
175
- pub const NCCS : usize = 32 ;
176
-
177
- pub const O_TRUNC : :: c_int = 512 ;
178
-
179
- pub const O_CLOEXEC : :: c_int = 0x80000 ;
180
-
181
- pub const EBFONT : :: c_int = 59 ;
182
- pub const ENOSTR : :: c_int = 60 ;
183
- pub const ENODATA : :: c_int = 61 ;
184
- pub const ETIME : :: c_int = 62 ;
185
- pub const ENOSR : :: c_int = 63 ;
186
- pub const ENONET : :: c_int = 64 ;
187
- pub const ENOPKG : :: c_int = 65 ;
188
- pub const EREMOTE : :: c_int = 66 ;
189
- pub const ENOLINK : :: c_int = 67 ;
190
- pub const EADV : :: c_int = 68 ;
191
- pub const ESRMNT : :: c_int = 69 ;
192
- pub const ECOMM : :: c_int = 70 ;
193
- pub const EPROTO : :: c_int = 71 ;
194
- pub const EDOTDOT : :: c_int = 73 ;
195
-
196
- pub const SA_NODEFER : :: c_int = 0x40000000 ;
197
- pub const SA_RESETHAND : :: c_int = 0x80000000 ;
198
- pub const SA_RESTART : :: c_int = 0x10000000 ;
199
- pub const SA_NOCLDSTOP : :: c_int = 0x00000001 ;
200
-
201
- pub const EPOLL_CLOEXEC : :: c_int = 0x80000 ;
202
-
203
- pub const EFD_CLOEXEC : :: c_int = 0x80000 ;
204
-
205
154
pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4 ;
206
155
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24 ;
207
156
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32 ;
208
157
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4 ;
209
158
pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8 ;
210
159
160
+ cfg_if ! {
161
+ if #[ cfg( target_arch = "sparc" ) ] {
162
+ pub const O_NOATIME : :: c_int = 0x200000 ;
163
+ pub const O_PATH : :: c_int = 0x1000000 ;
164
+ pub const O_TMPFILE : :: c_int = 0x2000000 | O_DIRECTORY ;
165
+ pub const SO_BINDTODEVICE : :: c_int = 0x000d ;
166
+ pub const SO_MARK : :: c_int = 0x0022 ;
167
+ pub const SO_RXQ_OVFL : :: c_int = 0x0024 ;
168
+ pub const SO_PEEK_OFF : :: c_int = 0x0026 ;
169
+ pub const SO_BUSY_POLL : :: c_int = 0x0030 ;
170
+
171
+ pub const SA_ONSTACK : :: c_int = 1 ;
172
+
173
+ pub const PTRACE_DETACH : :: c_uint = 11 ;
174
+
175
+ pub const F_SETLK : :: c_int = 8 ;
176
+ pub const F_SETLKW : :: c_int = 9 ;
177
+
178
+ pub const F_RDLCK : :: c_int = 1 ;
179
+ pub const F_WRLCK : :: c_int = 2 ;
180
+ pub const F_UNLCK : :: c_int = 3 ;
181
+
182
+ pub const SFD_CLOEXEC : :: c_int = 0x400000 ;
183
+
184
+ pub const NCCS : usize = 17 ;
185
+
186
+ pub const O_TRUNC : :: c_int = 0x400 ;
187
+ pub const O_CLOEXEC : :: c_int = 0x400000 ;
188
+
189
+ pub const EBFONT : :: c_int = 109 ;
190
+ pub const ENOSTR : :: c_int = 72 ;
191
+ pub const ENODATA : :: c_int = 111 ;
192
+ pub const ETIME : :: c_int = 73 ;
193
+ pub const ENOSR : :: c_int = 74 ;
194
+ pub const ENONET : :: c_int = 80 ;
195
+ pub const ENOPKG : :: c_int = 113 ;
196
+ pub const EREMOTE : :: c_int = 71 ;
197
+ pub const ENOLINK : :: c_int = 82 ;
198
+ pub const EADV : :: c_int = 83 ;
199
+ pub const ESRMNT : :: c_int = 84 ;
200
+ pub const ECOMM : :: c_int = 85 ;
201
+ pub const EPROTO : :: c_int = 86 ;
202
+ pub const EDOTDOT : :: c_int = 88 ;
203
+
204
+ pub const SA_NODEFER : :: c_int = 0x20 ;
205
+ pub const SA_RESETHAND : :: c_int = 0x4 ;
206
+ pub const SA_RESTART : :: c_int = 0x2 ;
207
+ pub const SA_NOCLDSTOP : :: c_int = 0x00000008 ;
208
+
209
+ pub const EPOLL_CLOEXEC : :: c_int = 0x400000 ;
210
+
211
+ pub const EFD_CLOEXEC : :: c_int = 0x400000 ;
212
+ } else {
213
+ pub const O_NOATIME : :: c_int = 0o1000000 ;
214
+ pub const O_PATH : :: c_int = 0o10000000 ;
215
+ pub const O_TMPFILE : :: c_int = 0o20000000 | O_DIRECTORY ;
216
+ pub const SO_BINDTODEVICE : :: c_int = 25 ;
217
+ pub const SO_MARK : :: c_int = 36 ;
218
+ pub const SO_RXQ_OVFL : :: c_int = 40 ;
219
+ pub const SO_PEEK_OFF : :: c_int = 42 ;
220
+ pub const SO_BUSY_POLL : :: c_int = 46 ;
221
+
222
+ pub const SA_ONSTACK : :: c_int = 0x08000000 ;
223
+
224
+ pub const PTRACE_DETACH : :: c_uint = 17 ;
225
+
226
+ pub const F_SETLK : :: c_int = 6 ;
227
+ pub const F_SETLKW : :: c_int = 7 ;
228
+
229
+ pub const F_RDLCK : :: c_int = 0 ;
230
+ pub const F_WRLCK : :: c_int = 1 ;
231
+ pub const F_UNLCK : :: c_int = 2 ;
232
+
233
+ pub const SFD_CLOEXEC : :: c_int = 0x080000 ;
234
+
235
+ pub const NCCS : usize = 32 ;
236
+
237
+ pub const O_TRUNC : :: c_int = 512 ;
238
+ pub const O_CLOEXEC : :: c_int = 0x80000 ;
239
+ pub const EBFONT : :: c_int = 59 ;
240
+ pub const ENOSTR : :: c_int = 60 ;
241
+ pub const ENODATA : :: c_int = 61 ;
242
+ pub const ETIME : :: c_int = 62 ;
243
+ pub const ENOSR : :: c_int = 63 ;
244
+ pub const ENONET : :: c_int = 64 ;
245
+ pub const ENOPKG : :: c_int = 65 ;
246
+ pub const EREMOTE : :: c_int = 66 ;
247
+ pub const ENOLINK : :: c_int = 67 ;
248
+ pub const EADV : :: c_int = 68 ;
249
+ pub const ESRMNT : :: c_int = 69 ;
250
+ pub const ECOMM : :: c_int = 70 ;
251
+ pub const EPROTO : :: c_int = 71 ;
252
+ pub const EDOTDOT : :: c_int = 73 ;
253
+
254
+ pub const SA_NODEFER : :: c_int = 0x40000000 ;
255
+ pub const SA_RESETHAND : :: c_int = 0x80000000 ;
256
+ pub const SA_RESTART : :: c_int = 0x10000000 ;
257
+ pub const SA_NOCLDSTOP : :: c_int = 0x00000001 ;
258
+
259
+ pub const EPOLL_CLOEXEC : :: c_int = 0x80000 ;
260
+
261
+ pub const EFD_CLOEXEC : :: c_int = 0x80000 ;
262
+ }
263
+ }
264
+
211
265
align_const ! {
212
266
#[ cfg( target_endian = "little" ) ]
213
267
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP : :: pthread_mutex_t =
0 commit comments