@@ -20,7 +20,8 @@ cfg_if! {
20
20
}
21
21
} else if #[ cfg( any( target_os = "linux" ,
22
22
target_os = "redox" ,
23
- target_os = "dragonfly" ) ) ] {
23
+ target_os = "dragonfly" ,
24
+ target_os = "fuchsia" ) ) ] {
24
25
unsafe fn errno_location( ) -> * mut c_int {
25
26
libc:: __errno_location( )
26
27
}
@@ -188,192 +189,254 @@ fn desc(errno: Errno) -> &'static str {
188
189
EHOSTDOWN => "Host is down" ,
189
190
EHOSTUNREACH => "No route to host" ,
190
191
191
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
192
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
193
+ target_os = "fuchsia" ) ) ]
192
194
ECHRNG => "Channel number out of range" ,
193
195
194
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
196
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
197
+ target_os = "fuchsia" ) ) ]
195
198
EL2NSYNC => "Level 2 not synchronized" ,
196
199
197
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
200
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
201
+ target_os = "fuchsia" ) ) ]
198
202
EL3HLT => "Level 3 halted" ,
199
203
200
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
204
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
205
+ target_os = "fuchsia" ) ) ]
201
206
EL3RST => "Level 3 reset" ,
202
207
203
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
208
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
209
+ target_os = "fuchsia" ) ) ]
204
210
ELNRNG => "Link number out of range" ,
205
211
206
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
212
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
213
+ target_os = "fuchsia" ) ) ]
207
214
EUNATCH => "Protocol driver not attached" ,
208
215
209
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
216
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
217
+ target_os = "fuchsia" ) ) ]
210
218
ENOCSI => "No CSI structure available" ,
211
219
212
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
220
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
221
+ target_os = "fuchsia" ) ) ]
213
222
EL2HLT => "Level 2 halted" ,
214
223
215
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
224
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
225
+ target_os = "fuchsia" ) ) ]
216
226
EBADE => "Invalid exchange" ,
217
227
218
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
228
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
229
+ target_os = "fuchsia" ) ) ]
219
230
EBADR => "Invalid request descriptor" ,
220
231
221
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
232
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
233
+ target_os = "fuchsia" ) ) ]
222
234
EXFULL => "Exchange full" ,
223
235
224
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
236
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
237
+ target_os = "fuchsia" ) ) ]
225
238
ENOANO => "No anode" ,
226
239
227
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
240
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
241
+ target_os = "fuchsia" ) ) ]
228
242
EBADRQC => "Invalid request code" ,
229
243
230
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
244
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
245
+ target_os = "fuchsia" ) ) ]
231
246
EBADSLT => "Invalid slot" ,
232
247
233
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
248
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
249
+ target_os = "fuchsia" ) ) ]
234
250
EBFONT => "Bad font file format" ,
235
251
236
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
252
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
253
+ target_os = "fuchsia" ) ) ]
237
254
ENOSTR => "Device not a stream" ,
238
255
239
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
256
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
257
+ target_os = "fuchsia" ) ) ]
240
258
ENODATA => "No data available" ,
241
259
242
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
260
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
261
+ target_os = "fuchsia" ) ) ]
243
262
ETIME => "Timer expired" ,
244
263
245
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
264
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
265
+ target_os = "fuchsia" ) ) ]
246
266
ENOSR => "Out of streams resources" ,
247
267
248
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
268
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
269
+ target_os = "fuchsia" ) ) ]
249
270
ENONET => "Machine is not on the network" ,
250
271
251
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
272
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
273
+ target_os = "fuchsia" ) ) ]
252
274
ENOPKG => "Package not installed" ,
253
275
254
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
276
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
277
+ target_os = "fuchsia" ) ) ]
255
278
EREMOTE => "Object is remote" ,
256
279
257
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
280
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
281
+ target_os = "fuchsia" ) ) ]
258
282
ENOLINK => "Link has been severed" ,
259
283
260
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
284
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
285
+ target_os = "fuchsia" ) ) ]
261
286
EADV => "Advertise error" ,
262
287
263
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
288
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
289
+ target_os = "fuchsia" ) ) ]
264
290
ESRMNT => "Srmount error" ,
265
291
266
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
292
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
293
+ target_os = "fuchsia" ) ) ]
267
294
ECOMM => "Communication error on send" ,
268
295
269
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
296
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
297
+ target_os = "fuchsia" ) ) ]
270
298
EPROTO => "Protocol error" ,
271
299
272
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
300
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
301
+ target_os = "fuchsia" ) ) ]
273
302
EMULTIHOP => "Multihop attempted" ,
274
303
275
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
304
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
305
+ target_os = "fuchsia" ) ) ]
276
306
EDOTDOT => "RFS specific error" ,
277
307
278
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
308
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
309
+ target_os = "fuchsia" ) ) ]
279
310
EBADMSG => "Not a data message" ,
280
311
281
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
312
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
313
+ target_os = "fuchsia" ) ) ]
282
314
EOVERFLOW => "Value too large for defined data type" ,
283
315
284
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
316
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
317
+ target_os = "fuchsia" ) ) ]
285
318
ENOTUNIQ => "Name not unique on network" ,
286
319
287
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
320
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
321
+ target_os = "fuchsia" ) ) ]
288
322
EBADFD => "File descriptor in bad state" ,
289
323
290
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
324
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
325
+ target_os = "fuchsia" ) ) ]
291
326
EREMCHG => "Remote address changed" ,
292
327
293
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
328
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
329
+ target_os = "fuchsia" ) ) ]
294
330
ELIBACC => "Can not access a needed shared library" ,
295
331
296
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
332
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
333
+ target_os = "fuchsia" ) ) ]
297
334
ELIBBAD => "Accessing a corrupted shared library" ,
298
335
299
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
336
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
337
+ target_os = "fuchsia" ) ) ]
300
338
ELIBSCN => ".lib section in a.out corrupted" ,
301
339
302
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
340
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
341
+ target_os = "fuchsia" ) ) ]
303
342
ELIBMAX => "Attempting to link in too many shared libraries" ,
304
343
305
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
344
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
345
+ target_os = "fuchsia" ) ) ]
306
346
ELIBEXEC => "Cannot exec a shared library directly" ,
307
347
308
- #[ cfg( any( target_os = "linux" , target_os = "android" , target_os = "openbsd" ) ) ]
348
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
349
+ target_os = "fuchsia" , target_os = "openbsd" ) ) ]
309
350
EILSEQ => "Illegal byte sequence" ,
310
351
311
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
352
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
353
+ target_os = "fuchsia" ) ) ]
312
354
ERESTART => "Interrupted system call should be restarted" ,
313
355
314
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
356
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
357
+ target_os = "fuchsia" ) ) ]
315
358
ESTRPIPE => "Streams pipe error" ,
316
359
317
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
360
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
361
+ target_os = "fuchsia" ) ) ]
318
362
EUSERS => "Too many users" ,
319
363
320
364
#[ cfg( any( target_os = "linux" , target_os = "android" ,
321
- target_os = "netbsd" , target_os = "redox" ) ) ]
365
+ target_os = "fuchsia" , target_os = "netbsd" ,
366
+ target_os = "redox" ) ) ]
322
367
EOPNOTSUPP => "Operation not supported on transport endpoint" ,
323
368
324
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
369
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
370
+ target_os = "fuchsia" ) ) ]
325
371
ESTALE => "Stale file handle" ,
326
372
327
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
373
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
374
+ target_os = "fuchsia" ) ) ]
328
375
EUCLEAN => "Structure needs cleaning" ,
329
376
330
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
377
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
378
+ target_os = "fuchsia" ) ) ]
331
379
ENOTNAM => "Not a XENIX named type file" ,
332
380
333
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
381
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
382
+ target_os = "fuchsia" ) ) ]
334
383
ENAVAIL => "No XENIX semaphores available" ,
335
384
336
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
385
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
386
+ target_os = "fuchsia" ) ) ]
337
387
EISNAM => "Is a named type file" ,
338
388
339
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
389
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
390
+ target_os = "fuchsia" ) ) ]
340
391
EREMOTEIO => "Remote I/O error" ,
341
392
342
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
393
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
394
+ target_os = "fuchsia" ) ) ]
343
395
EDQUOT => "Quota exceeded" ,
344
396
345
397
#[ cfg( any( target_os = "linux" , target_os = "android" ,
346
- target_os = "openbsd" , target_os = "dragonfly" ) ) ]
398
+ target_os = "fuchsia" , target_os = "openbsd" ,
399
+ target_os = "dragonfly" ) ) ]
347
400
ENOMEDIUM => "No medium found" ,
348
401
349
- #[ cfg( any( target_os = "linux" , target_os = "android" , target_os = "openbsd" ) ) ]
402
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
403
+ target_os = "fuchsia" , target_os = "openbsd" ) ) ]
350
404
EMEDIUMTYPE => "Wrong medium type" ,
351
405
352
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
406
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
407
+ target_os = "fuchsia" ) ) ]
353
408
ECANCELED => "Operation canceled" ,
354
409
355
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
410
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
411
+ target_os = "fuchsia" ) ) ]
356
412
ENOKEY => "Required key not available" ,
357
413
358
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
414
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
415
+ target_os = "fuchsia" ) ) ]
359
416
EKEYEXPIRED => "Key has expired" ,
360
417
361
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
418
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
419
+ target_os = "fuchsia" ) ) ]
362
420
EKEYREVOKED => "Key has been revoked" ,
363
421
364
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
422
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
423
+ target_os = "fuchsia" ) ) ]
365
424
EKEYREJECTED => "Key was rejected by service" ,
366
425
367
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
426
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
427
+ target_os = "fuchsia" ) ) ]
368
428
EOWNERDEAD => "Owner died" ,
369
429
370
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
430
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
431
+ target_os = "fuchsia" ) ) ]
371
432
ENOTRECOVERABLE => "State not recoverable" ,
372
433
373
- #[ cfg( all( target_os = "linux" , not( target_arch="mips" ) ) ) ]
434
+ #[ cfg( any( all( target_os = "linux" , not( target_arch="mips" ) ) ,
435
+ target_os = "fuchsia" ) ) ]
374
436
ERFKILL => "Operation not possible due to RF-kill" ,
375
437
376
- #[ cfg( all( target_os = "linux" , not( target_arch="mips" ) ) ) ]
438
+ #[ cfg( any( all( target_os = "linux" , not( target_arch="mips" ) ) ,
439
+ target_os = "fuchsia" ) ) ]
377
440
EHWPOISON => "Memory page has hardware error" ,
378
441
379
442
#[ cfg( any( target_os = "freebsd" , target_os = "dragonfly" ) ) ]
@@ -567,7 +630,8 @@ fn desc(errno: Errno) -> &'static str {
567
630
}
568
631
}
569
632
570
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
633
+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
634
+ target_os = "fuchsia" ) ) ]
571
635
mod consts {
572
636
#[ derive( Clone , Copy , Debug , Eq , PartialEq ) ]
573
637
#[ repr( i32 ) ]
0 commit comments