@@ -187,7 +187,6 @@ fn last() -> Errno {
187
187
Errno :: from_i32 ( errno ( ) )
188
188
}
189
189
190
- #[ cfg( not( target_os = "haiku" ) ) ]
191
190
fn desc ( errno : Errno ) -> & ' static str {
192
191
use self :: Errno :: * ;
193
192
match errno {
@@ -206,6 +205,7 @@ fn desc(errno: Errno) -> &'static str {
206
205
ENOMEM => "Out of memory" ,
207
206
EACCES => "Permission denied" ,
208
207
EFAULT => "Bad address" ,
208
+ #[ cfg( not( target_os = "haiku" ) ) ]
209
209
ENOTBLK => "Block device required" ,
210
210
EBUSY => "Device or resource busy" ,
211
211
EEXIST => "File exists" ,
@@ -242,8 +242,11 @@ fn desc(errno: Errno) -> &'static str {
242
242
EPROTOTYPE => "Protocol wrong type for socket" ,
243
243
ENOPROTOOPT => "Protocol not available" ,
244
244
EPROTONOSUPPORT => "Protocol not supported" ,
245
+ #[ cfg( not( target_os = "haiku" ) ) ]
245
246
ESOCKTNOSUPPORT => "Socket type not supported" ,
247
+ #[ cfg( not( target_os = "haiku" ) ) ]
246
248
EPFNOSUPPORT => "Protocol family not supported" ,
249
+ #[ cfg( not( target_os = "haiku" ) ) ]
247
250
EAFNOSUPPORT => "Address family not supported by protocol" ,
248
251
EADDRINUSE => "Address already in use" ,
249
252
EADDRNOTAVAIL => "Cannot assign requested address" ,
@@ -256,6 +259,7 @@ fn desc(errno: Errno) -> &'static str {
256
259
EISCONN => "Transport endpoint is already connected" ,
257
260
ENOTCONN => "Transport endpoint is not connected" ,
258
261
ESHUTDOWN => "Cannot send after transport endpoint shutdown" ,
262
+ #[ cfg( not( target_os = "haiku" ) ) ]
259
263
ETOOMANYREFS => "Too many references: cannot splice" ,
260
264
ETIMEDOUT => "Connection timed out" ,
261
265
ECONNREFUSED => "Connection refused" ,
@@ -414,7 +418,7 @@ fn desc(errno: Errno) -> &'static str {
414
418
EBADMSG => "Trying to read unreadable message" ,
415
419
416
420
#[ cfg( any( target_os = "linux" , target_os = "android" ,
417
- target_os = "fuchsia" ) ) ]
421
+ target_os = "fuchsia" , target_os = "haiku" ) ) ]
418
422
EOVERFLOW => "Value too large for defined data type" ,
419
423
420
424
#[ cfg( any( target_os = "linux" , target_os = "android" ,
@@ -521,7 +525,7 @@ fn desc(errno: Errno) -> &'static str {
521
525
522
526
#[ cfg( any( target_os = "linux" , target_os = "android" ,
523
527
target_os = "illumos" , target_os = "solaris" ,
524
- target_os = "fuchsia" ) ) ]
528
+ target_os = "fuchsia" , target_os = "haiku" ) ) ]
525
529
ECANCELED => "Operation canceled" ,
526
530
527
531
#[ cfg( any( target_os = "linux" , target_os = "android" ,
@@ -592,24 +596,26 @@ fn desc(errno: Errno) -> &'static str {
592
596
593
597
#[ cfg( any( target_os = "macos" , target_os = "freebsd" ,
594
598
target_os = "dragonfly" , target_os = "ios" ,
595
- target_os = "netbsd" , target_os = "redox" ) ) ]
599
+ target_os = "netbsd" , target_os = "redox" ,
600
+ target_os = "haiku" ) ) ]
596
601
EILSEQ => "Illegal byte sequence" ,
597
602
598
603
#[ cfg( any( target_os = "macos" , target_os = "freebsd" ,
599
604
target_os = "dragonfly" , target_os = "ios" ,
600
- target_os = "openbsd" , target_os = "netbsd" ) ) ]
605
+ target_os = "openbsd" , target_os = "netbsd" ,
606
+ target_os = "haiku" ) ) ]
601
607
ENOATTR => "Attribute not found" ,
602
608
603
609
#[ cfg( any( target_os = "macos" , target_os = "freebsd" ,
604
610
target_os = "dragonfly" , target_os = "ios" ,
605
611
target_os = "openbsd" , target_os = "netbsd" ,
606
- target_os = "redox" ) ) ]
612
+ target_os = "redox" , target_os = "haiku" ) ) ]
607
613
EBADMSG => "Bad message" ,
608
614
609
615
#[ cfg( any( target_os = "macos" , target_os = "freebsd" ,
610
616
target_os = "dragonfly" , target_os = "ios" ,
611
617
target_os = "openbsd" , target_os = "netbsd" ,
612
- target_os = "redox" ) ) ]
618
+ target_os = "redox" , target_os = "haiku" ) ) ]
613
619
EPROTO => "Protocol error" ,
614
620
615
621
#[ cfg( any( target_os = "macos" , target_os = "freebsd" ,
@@ -625,7 +631,8 @@ fn desc(errno: Errno) -> &'static str {
625
631
#[ cfg( any( target_os = "macos" , target_os = "freebsd" ,
626
632
target_os = "dragonfly" , target_os = "ios" ,
627
633
target_os = "openbsd" , target_os = "netbsd" ,
628
- target_os = "illumos" , target_os = "solaris" ) ) ]
634
+ target_os = "illumos" , target_os = "solaris" ,
635
+ target_os = "haiku" ) ) ]
629
636
ENOTSUP => "Operation not supported" ,
630
637
631
638
#[ cfg( any( target_os = "macos" , target_os = "freebsd" ,
@@ -643,14 +650,14 @@ fn desc(errno: Errno) -> &'static str {
643
650
target_os = "dragonfly" , target_os = "ios" ,
644
651
target_os = "openbsd" , target_os = "netbsd" ,
645
652
target_os = "redox" , target_os = "illumos" ,
646
- target_os = "solaris" ) ) ]
653
+ target_os = "solaris" , target_os = "haiku" ) ) ]
647
654
EDQUOT => "Disc quota exceeded" ,
648
655
649
656
#[ cfg( any( target_os = "macos" , target_os = "freebsd" ,
650
657
target_os = "dragonfly" , target_os = "ios" ,
651
658
target_os = "openbsd" , target_os = "netbsd" ,
652
659
target_os = "redox" , target_os = "illumos" ,
653
- target_os = "solaris" ) ) ]
660
+ target_os = "solaris" , target_os = "haiku" ) ) ]
654
661
ESTALE => "Stale NFS file handle" ,
655
662
656
663
#[ cfg( any( target_os = "macos" , target_os = "freebsd" ,
@@ -719,15 +726,15 @@ fn desc(errno: Errno) -> &'static str {
719
726
EBADMACHO => "Malformed Macho file" ,
720
727
721
728
#[ cfg( any( target_os = "macos" , target_os = "ios" ,
722
- target_os = "netbsd" ) ) ]
729
+ target_os = "netbsd" , target_os = "haiku" ) ) ]
723
730
EMULTIHOP => "Reserved" ,
724
731
725
732
#[ cfg( any( target_os = "macos" , target_os = "ios" ,
726
733
target_os = "netbsd" , target_os = "redox" ) ) ]
727
734
ENODATA => "No message available on STREAM" ,
728
735
729
736
#[ cfg( any( target_os = "macos" , target_os = "ios" ,
730
- target_os = "netbsd" ) ) ]
737
+ target_os = "netbsd" , target_os = "haiku" ) ) ]
731
738
ENOLINK => "Reserved" ,
732
739
733
740
#[ cfg( any( target_os = "macos" , target_os = "ios" ,
@@ -772,80 +779,6 @@ fn desc(errno: Errno) -> &'static str {
772
779
}
773
780
}
774
781
775
- #[ cfg( target_os = "haiku" ) ]
776
- fn desc ( errno : Errno ) -> & ' static str {
777
- use self :: Errno :: * ;
778
- match errno {
779
- UnknownErrno => "Unknown errno" ,
780
- EPERM => "Operation not permitted" ,
781
- ENOENT => "No such file or directory" ,
782
- ESRCH => "No such process" ,
783
- EINTR => "Interrupted system call" ,
784
- EIO => "I/O error" ,
785
- ENXIO => "No such device or address" ,
786
- E2BIG => "Argument list too long" ,
787
- ENOEXEC => "Exec format error" ,
788
- EBADF => "Bad file number" ,
789
- ECHILD => "No child processes" ,
790
- EAGAIN => "Try again" ,
791
- ENOMEM => "Out of memory" ,
792
- EACCES => "Permission denied" ,
793
- EFAULT => "Bad address" ,
794
- EBUSY => "Device or resource busy" ,
795
- EEXIST => "File exists" ,
796
- EXDEV => "Cross-device link" ,
797
- ENODEV => "No such device" ,
798
- ENOTDIR => "Not a directory" ,
799
- EISDIR => "Is a directory" ,
800
- EINVAL => "Invalid argument" ,
801
- ENFILE => "File table overflow" ,
802
- EMFILE => "Too many open files" ,
803
- ENOTTY => "Not a typewriter" ,
804
- ETXTBSY => "Text file busy" ,
805
- EFBIG => "File too large" ,
806
- ENOSPC => "No space left on device" ,
807
- ESPIPE => "Illegal seek" ,
808
- EROFS => "Read-only file system" ,
809
- EMLINK => "Too many links" ,
810
- EPIPE => "Broken pipe" ,
811
- EDOM => "Math argument out of domain of func" ,
812
- ERANGE => "Math result not representable" ,
813
- EDEADLK => "Resource deadlock would occur" ,
814
- ENAMETOOLONG => "File name too long" ,
815
- ENOLCK => "No record locks available" ,
816
- ENOSYS => "Function not implemented" ,
817
- ENOTEMPTY => "Directory not empty" ,
818
- ELOOP => "Too many symbolic links encountered" ,
819
- ENOMSG => "No message of desired type" ,
820
- EIDRM => "Identifier removed" ,
821
- EINPROGRESS => "Operation now in progress" ,
822
- EALREADY => "Operation already in progress" ,
823
- ENOTSOCK => "Socket operation on non-socket" ,
824
- EDESTADDRREQ => "Destination address required" ,
825
- EMSGSIZE => "Message too long" ,
826
- EPROTOTYPE => "Protocol wrong type for socket" ,
827
- ENOPROTOOPT => "Protocol not available" ,
828
- EPROTONOSUPPORT => "Protocol not supported" ,
829
- EADDRINUSE => "Address already in use" ,
830
- EADDRNOTAVAIL => "Cannot assign requested address" ,
831
- ENETDOWN => "Network is down" ,
832
- ENETUNREACH => "Network is unreachable" ,
833
- ENETRESET => "Network dropped connection because of reset" ,
834
- ECONNABORTED => "Software caused connection abort" ,
835
- ECONNRESET => "Connection reset by peer" ,
836
- ENOBUFS => "No buffer space available" ,
837
- EISCONN => "Transport endpoint is already connected" ,
838
- ENOTCONN => "Transport endpoint is not connected" ,
839
- ESHUTDOWN => "Cannot send after transport endpoint shutdown" ,
840
- ETIMEDOUT => "Connection timed out" ,
841
- ECONNREFUSED => "Connection refused" ,
842
- EHOSTDOWN => "Host is down" ,
843
- EHOSTUNREACH => "No route to host" ,
844
- _ => "unknown errno" ,
845
-
846
- }
847
- }
848
-
849
782
#[ cfg( any( target_os = "linux" , target_os = "android" ,
850
783
target_os = "fuchsia" ) ) ]
851
784
mod consts {
0 commit comments