@@ -25,7 +25,7 @@ cfg_if! {
25
25
unsafe fn errno_location( ) -> * mut c_int {
26
26
unsafe { libc:: __errno_location( ) }
27
27
}
28
- } else if #[ cfg( any ( target_os = "illumos" , target_os = "solaris" ) ) ] {
28
+ } else if #[ cfg( solarish ) ] {
29
29
unsafe fn errno_location( ) -> * mut c_int {
30
30
unsafe { libc:: ___errno( ) }
31
31
}
@@ -501,7 +501,7 @@ fn desc(errno: Errno) -> &'static str {
501
501
) ) ]
502
502
EBADMSG => "Not a data message" ,
503
503
504
- #[ cfg( any ( target_os = "illumos" , target_os = "solaris" ) ) ]
504
+ #[ cfg( solarish ) ]
505
505
EBADMSG => "Trying to read unreadable message" ,
506
506
507
507
#[ cfg( any(
@@ -745,7 +745,7 @@ fn desc(errno: Errno) -> &'static str {
745
745
) ) ]
746
746
EOWNERDEAD => "Owner died" ,
747
747
748
- #[ cfg( any ( target_os = "illumos" , target_os = "solaris" ) ) ]
748
+ #[ cfg( solarish ) ]
749
749
EOWNERDEAD => "Process died with lock" ,
750
750
751
751
#[ cfg( any(
@@ -756,7 +756,7 @@ fn desc(errno: Errno) -> &'static str {
756
756
) ) ]
757
757
ENOTRECOVERABLE => "State not recoverable" ,
758
758
759
- #[ cfg( any ( target_os = "illumos" , target_os = "solaris" ) ) ]
759
+ #[ cfg( solarish ) ]
760
760
ENOTRECOVERABLE => "Lock is not recoverable" ,
761
761
762
762
#[ cfg( any(
@@ -794,25 +794,10 @@ fn desc(errno: Errno) -> &'static str {
794
794
#[ cfg( target_os = "freebsd" ) ]
795
795
ECAPMODE => "Not permitted in capability mode" ,
796
796
797
- #[ cfg( any(
798
- target_os = "freebsd" ,
799
- target_os = "dragonfly" ,
800
- apple_targets,
801
- target_os = "openbsd" ,
802
- target_os = "netbsd"
803
- ) ) ]
797
+ #[ cfg( bsd) ]
804
798
ENEEDAUTH => "Need authenticator" ,
805
799
806
- #[ cfg( any(
807
- target_os = "freebsd" ,
808
- target_os = "dragonfly" ,
809
- apple_targets,
810
- target_os = "openbsd" ,
811
- target_os = "netbsd" ,
812
- target_os = "redox" ,
813
- target_os = "illumos" ,
814
- target_os = "solaris"
815
- ) ) ]
800
+ #[ cfg( any( bsd, target_os = "redox" , solarish) ) ]
816
801
EOVERFLOW => "Value too large to be stored in data type" ,
817
802
818
803
#[ cfg( any(
@@ -825,36 +810,13 @@ fn desc(errno: Errno) -> &'static str {
825
810
) ) ]
826
811
EILSEQ => "Illegal byte sequence" ,
827
812
828
- #[ cfg( any(
829
- target_os = "freebsd" ,
830
- target_os = "dragonfly" ,
831
- apple_targets,
832
- target_os = "openbsd" ,
833
- target_os = "netbsd" ,
834
- target_os = "haiku"
835
- ) ) ]
813
+ #[ cfg( any( bsd, target_os = "haiku" ) ) ]
836
814
ENOATTR => "Attribute not found" ,
837
815
838
- #[ cfg( any(
839
- target_os = "freebsd" ,
840
- target_os = "dragonfly" ,
841
- apple_targets,
842
- target_os = "openbsd" ,
843
- target_os = "netbsd" ,
844
- target_os = "redox" ,
845
- target_os = "haiku"
846
- ) ) ]
816
+ #[ cfg( any( bsd, target_os = "redox" , target_os = "haiku" ) ) ]
847
817
EBADMSG => "Bad message" ,
848
818
849
- #[ cfg( any(
850
- target_os = "freebsd" ,
851
- target_os = "dragonfly" ,
852
- apple_targets,
853
- target_os = "openbsd" ,
854
- target_os = "netbsd" ,
855
- target_os = "redox" ,
856
- target_os = "haiku"
857
- ) ) ]
819
+ #[ cfg( any( bsd, target_os = "redox" , target_os = "haiku" ) ) ]
858
820
EPROTO => "Protocol error" ,
859
821
860
822
#[ cfg( any(
@@ -873,46 +835,17 @@ fn desc(errno: Errno) -> &'static str {
873
835
) ) ]
874
836
EOWNERDEAD => "Previous owner died" ,
875
837
876
- #[ cfg( any(
877
- target_os = "freebsd" ,
878
- target_os = "dragonfly" ,
879
- apple_targets,
880
- target_os = "openbsd" ,
881
- target_os = "netbsd" ,
882
- target_os = "aix" ,
883
- target_os = "illumos" ,
884
- target_os = "solaris" ,
885
- target_os = "haiku"
886
- ) ) ]
838
+ #[ cfg( any( bsd, target_os = "aix" , solarish, target_os = "haiku" ) ) ]
887
839
ENOTSUP => "Operation not supported" ,
888
840
889
- #[ cfg( any(
890
- target_os = "freebsd" ,
891
- target_os = "dragonfly" ,
892
- apple_targets,
893
- target_os = "aix" ,
894
- target_os = "openbsd" ,
895
- target_os = "netbsd"
896
- ) ) ]
841
+ #[ cfg( any( bsd, target_os = "aix" ) ) ]
897
842
EPROCLIM => "Too many processes" ,
898
843
899
- #[ cfg( any(
900
- target_os = "freebsd" ,
901
- target_os = "dragonfly" ,
902
- apple_targets,
903
- target_os = "aix" ,
904
- target_os = "openbsd" ,
905
- target_os = "netbsd" ,
906
- target_os = "redox"
907
- ) ) ]
844
+ #[ cfg( any( bsd, target_os = "aix" , target_os = "redox" ) ) ]
908
845
EUSERS => "Too many users" ,
909
846
910
847
#[ cfg( any(
911
- target_os = "freebsd" ,
912
- target_os = "dragonfly" ,
913
- apple_targets,
914
- target_os = "openbsd" ,
915
- target_os = "netbsd" ,
848
+ bsd,
916
849
target_os = "redox" ,
917
850
target_os = "aix" ,
918
851
target_os = "illumos" ,
@@ -922,11 +855,7 @@ fn desc(errno: Errno) -> &'static str {
922
855
EDQUOT => "Disc quota exceeded" ,
923
856
924
857
#[ cfg( any(
925
- target_os = "freebsd" ,
926
- target_os = "dragonfly" ,
927
- apple_targets,
928
- target_os = "openbsd" ,
929
- target_os = "netbsd" ,
858
+ bsd,
930
859
target_os = "redox" ,
931
860
target_os = "aix" ,
932
861
target_os = "illumos" ,
@@ -935,89 +864,31 @@ fn desc(errno: Errno) -> &'static str {
935
864
) ) ]
936
865
ESTALE => "Stale NFS file handle" ,
937
866
938
- #[ cfg( any(
939
- target_os = "freebsd" ,
940
- target_os = "dragonfly" ,
941
- apple_targets,
942
- target_os = "aix" ,
943
- target_os = "openbsd" ,
944
- target_os = "netbsd" ,
945
- target_os = "redox"
946
- ) ) ]
867
+ #[ cfg( any( bsd, target_os = "aix" , target_os = "redox" ) ) ]
947
868
EREMOTE => "Too many levels of remote in path" ,
948
869
949
- #[ cfg( any(
950
- target_os = "freebsd" ,
951
- target_os = "dragonfly" ,
952
- apple_targets,
953
- target_os = "openbsd" ,
954
- target_os = "netbsd"
955
- ) ) ]
870
+ #[ cfg( bsd) ]
956
871
EBADRPC => "RPC struct is bad" ,
957
872
958
- #[ cfg( any(
959
- target_os = "freebsd" ,
960
- target_os = "dragonfly" ,
961
- apple_targets,
962
- target_os = "openbsd" ,
963
- target_os = "netbsd"
964
- ) ) ]
873
+ #[ cfg( bsd) ]
965
874
ERPCMISMATCH => "RPC version wrong" ,
966
875
967
- #[ cfg( any(
968
- target_os = "freebsd" ,
969
- target_os = "dragonfly" ,
970
- apple_targets,
971
- target_os = "openbsd" ,
972
- target_os = "netbsd"
973
- ) ) ]
876
+ #[ cfg( bsd) ]
974
877
EPROGUNAVAIL => "RPC prog. not avail" ,
975
878
976
- #[ cfg( any(
977
- target_os = "freebsd" ,
978
- target_os = "dragonfly" ,
979
- apple_targets,
980
- target_os = "openbsd" ,
981
- target_os = "netbsd"
982
- ) ) ]
879
+ #[ cfg( bsd) ]
983
880
EPROGMISMATCH => "Program version wrong" ,
984
881
985
- #[ cfg( any(
986
- target_os = "freebsd" ,
987
- target_os = "dragonfly" ,
988
- apple_targets,
989
- target_os = "openbsd" ,
990
- target_os = "netbsd"
991
- ) ) ]
882
+ #[ cfg( bsd) ]
992
883
EPROCUNAVAIL => "Bad procedure for program" ,
993
884
994
- #[ cfg( any(
995
- target_os = "freebsd" ,
996
- target_os = "dragonfly" ,
997
- apple_targets,
998
- target_os = "openbsd" ,
999
- target_os = "netbsd"
1000
- ) ) ]
885
+ #[ cfg( bsd) ]
1001
886
EFTYPE => "Inappropriate file type or format" ,
1002
887
1003
- #[ cfg( any(
1004
- target_os = "freebsd" ,
1005
- target_os = "dragonfly" ,
1006
- apple_targets,
1007
- target_os = "openbsd" ,
1008
- target_os = "netbsd"
1009
- ) ) ]
888
+ #[ cfg( bsd) ]
1010
889
EAUTH => "Authentication error" ,
1011
890
1012
- #[ cfg( any(
1013
- target_os = "freebsd" ,
1014
- target_os = "dragonfly" ,
1015
- apple_targets,
1016
- target_os = "aix" ,
1017
- target_os = "openbsd" ,
1018
- target_os = "netbsd" ,
1019
- target_os = "redox"
1020
- ) ) ]
891
+ #[ cfg( any( bsd, target_os = "aix" , target_os = "redox" ) ) ]
1021
892
ECANCELED => "Operation canceled" ,
1022
893
1023
894
#[ cfg( apple_targets) ]
@@ -1099,13 +970,13 @@ fn desc(errno: Errno) -> &'static str {
1099
970
#[ cfg( target_os = "dragonfly" ) ]
1100
971
EASYNC => "Async" ,
1101
972
1102
- #[ cfg( any ( target_os = "illumos" , target_os = "solaris" ) ) ]
973
+ #[ cfg( solarish ) ]
1103
974
EDEADLOCK => "Resource deadlock would occur" ,
1104
975
1105
- #[ cfg( any ( target_os = "illumos" , target_os = "solaris" ) ) ]
976
+ #[ cfg( solarish ) ]
1106
977
ELOCKUNMAPPED => "Locked lock was unmapped" ,
1107
978
1108
- #[ cfg( any ( target_os = "illumos" , target_os = "solaris" ) ) ]
979
+ #[ cfg( solarish ) ]
1109
980
ENOTACTIVE => "Facility is not active" ,
1110
981
}
1111
982
}
@@ -2688,7 +2559,7 @@ mod consts {
2688
2559
}
2689
2560
}
2690
2561
2691
- #[ cfg( any ( target_os = "illumos" , target_os = "solaris" ) ) ]
2562
+ #[ cfg( solarish ) ]
2692
2563
mod consts {
2693
2564
#[ derive( Clone , Copy , Debug , Eq , PartialEq ) ]
2694
2565
#[ repr( i32 ) ]
0 commit comments