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