@@ -20,7 +20,8 @@ cfg_if! {
2020 }
2121 } else if #[ cfg( any( target_os = "linux" ,
2222 target_os = "redox" ,
23- target_os = "dragonfly" ) ) ] {
23+ target_os = "dragonfly" ,
24+ target_os = "fuchsia" ) ) ] {
2425 unsafe fn errno_location( ) -> * mut c_int {
2526 libc:: __errno_location( )
2627 }
@@ -188,192 +189,254 @@ fn desc(errno: Errno) -> &'static str {
188189 EHOSTDOWN => "Host is down" ,
189190 EHOSTUNREACH => "No route to host" ,
190191
191- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
192+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
193+ target_os = "fuchsia" ) ) ]
192194 ECHRNG => "Channel number out of range" ,
193195
194- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
196+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
197+ target_os = "fuchsia" ) ) ]
195198 EL2NSYNC => "Level 2 not synchronized" ,
196199
197- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
200+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
201+ target_os = "fuchsia" ) ) ]
198202 EL3HLT => "Level 3 halted" ,
199203
200- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
204+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
205+ target_os = "fuchsia" ) ) ]
201206 EL3RST => "Level 3 reset" ,
202207
203- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
208+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
209+ target_os = "fuchsia" ) ) ]
204210 ELNRNG => "Link number out of range" ,
205211
206- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
212+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
213+ target_os = "fuchsia" ) ) ]
207214 EUNATCH => "Protocol driver not attached" ,
208215
209- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
216+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
217+ target_os = "fuchsia" ) ) ]
210218 ENOCSI => "No CSI structure available" ,
211219
212- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
220+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
221+ target_os = "fuchsia" ) ) ]
213222 EL2HLT => "Level 2 halted" ,
214223
215- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
224+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
225+ target_os = "fuchsia" ) ) ]
216226 EBADE => "Invalid exchange" ,
217227
218- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
228+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
229+ target_os = "fuchsia" ) ) ]
219230 EBADR => "Invalid request descriptor" ,
220231
221- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
232+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
233+ target_os = "fuchsia" ) ) ]
222234 EXFULL => "Exchange full" ,
223235
224- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
236+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
237+ target_os = "fuchsia" ) ) ]
225238 ENOANO => "No anode" ,
226239
227- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
240+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
241+ target_os = "fuchsia" ) ) ]
228242 EBADRQC => "Invalid request code" ,
229243
230- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
244+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
245+ target_os = "fuchsia" ) ) ]
231246 EBADSLT => "Invalid slot" ,
232247
233- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
248+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
249+ target_os = "fuchsia" ) ) ]
234250 EBFONT => "Bad font file format" ,
235251
236- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
252+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
253+ target_os = "fuchsia" ) ) ]
237254 ENOSTR => "Device not a stream" ,
238255
239- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
256+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
257+ target_os = "fuchsia" ) ) ]
240258 ENODATA => "No data available" ,
241259
242- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
260+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
261+ target_os = "fuchsia" ) ) ]
243262 ETIME => "Timer expired" ,
244263
245- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
264+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
265+ target_os = "fuchsia" ) ) ]
246266 ENOSR => "Out of streams resources" ,
247267
248- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
268+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
269+ target_os = "fuchsia" ) ) ]
249270 ENONET => "Machine is not on the network" ,
250271
251- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
272+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
273+ target_os = "fuchsia" ) ) ]
252274 ENOPKG => "Package not installed" ,
253275
254- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
276+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
277+ target_os = "fuchsia" ) ) ]
255278 EREMOTE => "Object is remote" ,
256279
257- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
280+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
281+ target_os = "fuchsia" ) ) ]
258282 ENOLINK => "Link has been severed" ,
259283
260- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
284+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
285+ target_os = "fuchsia" ) ) ]
261286 EADV => "Advertise error" ,
262287
263- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
288+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
289+ target_os = "fuchsia" ) ) ]
264290 ESRMNT => "Srmount error" ,
265291
266- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
292+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
293+ target_os = "fuchsia" ) ) ]
267294 ECOMM => "Communication error on send" ,
268295
269- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
296+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
297+ target_os = "fuchsia" ) ) ]
270298 EPROTO => "Protocol error" ,
271299
272- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
300+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
301+ target_os = "fuchsia" ) ) ]
273302 EMULTIHOP => "Multihop attempted" ,
274303
275- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
304+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
305+ target_os = "fuchsia" ) ) ]
276306 EDOTDOT => "RFS specific error" ,
277307
278- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
308+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
309+ target_os = "fuchsia" ) ) ]
279310 EBADMSG => "Not a data message" ,
280311
281- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
312+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
313+ target_os = "fuchsia" ) ) ]
282314 EOVERFLOW => "Value too large for defined data type" ,
283315
284- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
316+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
317+ target_os = "fuchsia" ) ) ]
285318 ENOTUNIQ => "Name not unique on network" ,
286319
287- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
320+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
321+ target_os = "fuchsia" ) ) ]
288322 EBADFD => "File descriptor in bad state" ,
289323
290- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
324+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
325+ target_os = "fuchsia" ) ) ]
291326 EREMCHG => "Remote address changed" ,
292327
293- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
328+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
329+ target_os = "fuchsia" ) ) ]
294330 ELIBACC => "Can not access a needed shared library" ,
295331
296- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
332+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
333+ target_os = "fuchsia" ) ) ]
297334 ELIBBAD => "Accessing a corrupted shared library" ,
298335
299- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
336+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
337+ target_os = "fuchsia" ) ) ]
300338 ELIBSCN => ".lib section in a.out corrupted" ,
301339
302- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
340+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
341+ target_os = "fuchsia" ) ) ]
303342 ELIBMAX => "Attempting to link in too many shared libraries" ,
304343
305- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
344+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
345+ target_os = "fuchsia" ) ) ]
306346 ELIBEXEC => "Cannot exec a shared library directly" ,
307347
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" ) ) ]
309350 EILSEQ => "Illegal byte sequence" ,
310351
311- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
352+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
353+ target_os = "fuchsia" ) ) ]
312354 ERESTART => "Interrupted system call should be restarted" ,
313355
314- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
356+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
357+ target_os = "fuchsia" ) ) ]
315358 ESTRPIPE => "Streams pipe error" ,
316359
317- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
360+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
361+ target_os = "fuchsia" ) ) ]
318362 EUSERS => "Too many users" ,
319363
320364 #[ 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" ) ) ]
322367 EOPNOTSUPP => "Operation not supported on transport endpoint" ,
323368
324- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
369+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
370+ target_os = "fuchsia" ) ) ]
325371 ESTALE => "Stale file handle" ,
326372
327- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
373+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
374+ target_os = "fuchsia" ) ) ]
328375 EUCLEAN => "Structure needs cleaning" ,
329376
330- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
377+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
378+ target_os = "fuchsia" ) ) ]
331379 ENOTNAM => "Not a XENIX named type file" ,
332380
333- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
381+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
382+ target_os = "fuchsia" ) ) ]
334383 ENAVAIL => "No XENIX semaphores available" ,
335384
336- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
385+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
386+ target_os = "fuchsia" ) ) ]
337387 EISNAM => "Is a named type file" ,
338388
339- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
389+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
390+ target_os = "fuchsia" ) ) ]
340391 EREMOTEIO => "Remote I/O error" ,
341392
342- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
393+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
394+ target_os = "fuchsia" ) ) ]
343395 EDQUOT => "Quota exceeded" ,
344396
345397 #[ 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" ) ) ]
347400 ENOMEDIUM => "No medium found" ,
348401
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" ) ) ]
350404 EMEDIUMTYPE => "Wrong medium type" ,
351405
352- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
406+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
407+ target_os = "fuchsia" ) ) ]
353408 ECANCELED => "Operation canceled" ,
354409
355- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
410+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
411+ target_os = "fuchsia" ) ) ]
356412 ENOKEY => "Required key not available" ,
357413
358- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
414+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
415+ target_os = "fuchsia" ) ) ]
359416 EKEYEXPIRED => "Key has expired" ,
360417
361- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
418+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
419+ target_os = "fuchsia" ) ) ]
362420 EKEYREVOKED => "Key has been revoked" ,
363421
364- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
422+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
423+ target_os = "fuchsia" ) ) ]
365424 EKEYREJECTED => "Key was rejected by service" ,
366425
367- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
426+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
427+ target_os = "fuchsia" ) ) ]
368428 EOWNERDEAD => "Owner died" ,
369429
370- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
430+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
431+ target_os = "fuchsia" ) ) ]
371432 ENOTRECOVERABLE => "State not recoverable" ,
372433
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" ) ) ]
374436 ERFKILL => "Operation not possible due to RF-kill" ,
375437
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" ) ) ]
377440 EHWPOISON => "Memory page has hardware error" ,
378441
379442 #[ cfg( any( target_os = "freebsd" , target_os = "dragonfly" ) ) ]
@@ -567,7 +630,8 @@ fn desc(errno: Errno) -> &'static str {
567630 }
568631}
569632
570- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
633+ #[ cfg( any( target_os = "linux" , target_os = "android" ,
634+ target_os = "fuchsia" ) ) ]
571635mod consts {
572636 #[ derive( Clone , Copy , Debug , Eq , PartialEq ) ]
573637 #[ repr( i32 ) ]
0 commit comments