|
880 | 880 | pub struct pthread_condattr_t { |
881 | 881 | size: [u8; crate::__SIZEOF_PTHREAD_CONDATTR_T], |
882 | 882 | } |
883 | | -} |
884 | 883 |
|
885 | | -s_no_extra_traits! { |
886 | 884 | pub struct sysinfo { |
887 | 885 | pub uptime: c_ulong, |
888 | 886 | pub loads: [c_ulong; 3], |
@@ -969,6 +967,8 @@ s_no_extra_traits! { |
969 | 967 | pub nl_groups: u32, |
970 | 968 | } |
971 | 969 |
|
| 970 | + // FIXME(msrv): suggested method was added in 1.85 |
| 971 | + #[allow(unpredictable_function_pointer_comparisons)] |
972 | 972 | pub struct sigevent { |
973 | 973 | pub sigev_value: crate::sigval, |
974 | 974 | pub sigev_signo: c_int, |
@@ -1023,269 +1023,6 @@ s_no_extra_traits! { |
1023 | 1023 | } |
1024 | 1024 | } |
1025 | 1025 |
|
1026 | | -cfg_if! { |
1027 | | - if #[cfg(feature = "extra_traits")] { |
1028 | | - impl PartialEq for sysinfo { |
1029 | | - fn eq(&self, other: &sysinfo) -> bool { |
1030 | | - self.uptime == other.uptime |
1031 | | - && self.loads == other.loads |
1032 | | - && self.totalram == other.totalram |
1033 | | - && self.freeram == other.freeram |
1034 | | - && self.sharedram == other.sharedram |
1035 | | - && self.bufferram == other.bufferram |
1036 | | - && self.totalswap == other.totalswap |
1037 | | - && self.freeswap == other.freeswap |
1038 | | - && self.procs == other.procs |
1039 | | - && self.pad == other.pad |
1040 | | - && self.totalhigh == other.totalhigh |
1041 | | - && self.freehigh == other.freehigh |
1042 | | - && self.mem_unit == other.mem_unit |
1043 | | - && self |
1044 | | - .__reserved |
1045 | | - .iter() |
1046 | | - .zip(other.__reserved.iter()) |
1047 | | - .all(|(a, b)| a == b) |
1048 | | - } |
1049 | | - } |
1050 | | - impl Eq for sysinfo {} |
1051 | | - impl hash::Hash for sysinfo { |
1052 | | - fn hash<H: hash::Hasher>(&self, state: &mut H) { |
1053 | | - self.uptime.hash(state); |
1054 | | - self.loads.hash(state); |
1055 | | - self.totalram.hash(state); |
1056 | | - self.freeram.hash(state); |
1057 | | - self.sharedram.hash(state); |
1058 | | - self.bufferram.hash(state); |
1059 | | - self.totalswap.hash(state); |
1060 | | - self.freeswap.hash(state); |
1061 | | - self.procs.hash(state); |
1062 | | - self.pad.hash(state); |
1063 | | - self.totalhigh.hash(state); |
1064 | | - self.freehigh.hash(state); |
1065 | | - self.mem_unit.hash(state); |
1066 | | - self.__reserved.hash(state); |
1067 | | - } |
1068 | | - } |
1069 | | - |
1070 | | - impl PartialEq for sockaddr_un { |
1071 | | - fn eq(&self, other: &sockaddr_un) -> bool { |
1072 | | - self.sun_family == other.sun_family |
1073 | | - && self |
1074 | | - .sun_path |
1075 | | - .iter() |
1076 | | - .zip(other.sun_path.iter()) |
1077 | | - .all(|(a, b)| a == b) |
1078 | | - } |
1079 | | - } |
1080 | | - impl Eq for sockaddr_un {} |
1081 | | - impl hash::Hash for sockaddr_un { |
1082 | | - fn hash<H: hash::Hasher>(&self, state: &mut H) { |
1083 | | - self.sun_family.hash(state); |
1084 | | - self.sun_path.hash(state); |
1085 | | - } |
1086 | | - } |
1087 | | - |
1088 | | - impl PartialEq for sockaddr_storage { |
1089 | | - fn eq(&self, other: &sockaddr_storage) -> bool { |
1090 | | - self.ss_family == other.ss_family |
1091 | | - && self.__ss_align == other.__ss_align |
1092 | | - && self |
1093 | | - .__ss_pad2 |
1094 | | - .iter() |
1095 | | - .zip(other.__ss_pad2.iter()) |
1096 | | - .all(|(a, b)| a == b) |
1097 | | - } |
1098 | | - } |
1099 | | - impl Eq for sockaddr_storage {} |
1100 | | - impl hash::Hash for sockaddr_storage { |
1101 | | - fn hash<H: hash::Hasher>(&self, state: &mut H) { |
1102 | | - self.ss_family.hash(state); |
1103 | | - self.__ss_align.hash(state); |
1104 | | - self.__ss_pad2.hash(state); |
1105 | | - } |
1106 | | - } |
1107 | | - |
1108 | | - impl PartialEq for utsname { |
1109 | | - fn eq(&self, other: &utsname) -> bool { |
1110 | | - self.sysname |
1111 | | - .iter() |
1112 | | - .zip(other.sysname.iter()) |
1113 | | - .all(|(a, b)| a == b) |
1114 | | - && self |
1115 | | - .nodename |
1116 | | - .iter() |
1117 | | - .zip(other.nodename.iter()) |
1118 | | - .all(|(a, b)| a == b) |
1119 | | - && self |
1120 | | - .release |
1121 | | - .iter() |
1122 | | - .zip(other.release.iter()) |
1123 | | - .all(|(a, b)| a == b) |
1124 | | - && self |
1125 | | - .version |
1126 | | - .iter() |
1127 | | - .zip(other.version.iter()) |
1128 | | - .all(|(a, b)| a == b) |
1129 | | - && self |
1130 | | - .machine |
1131 | | - .iter() |
1132 | | - .zip(other.machine.iter()) |
1133 | | - .all(|(a, b)| a == b) |
1134 | | - } |
1135 | | - } |
1136 | | - impl Eq for utsname {} |
1137 | | - impl hash::Hash for utsname { |
1138 | | - fn hash<H: hash::Hasher>(&self, state: &mut H) { |
1139 | | - self.sysname.hash(state); |
1140 | | - self.nodename.hash(state); |
1141 | | - self.release.hash(state); |
1142 | | - self.version.hash(state); |
1143 | | - self.machine.hash(state); |
1144 | | - } |
1145 | | - } |
1146 | | - |
1147 | | - impl PartialEq for dirent { |
1148 | | - fn eq(&self, other: &dirent) -> bool { |
1149 | | - self.d_ino == other.d_ino |
1150 | | - && self.d_off == other.d_off |
1151 | | - && self.d_reclen == other.d_reclen |
1152 | | - && self.d_type == other.d_type |
1153 | | - && self |
1154 | | - .d_name |
1155 | | - .iter() |
1156 | | - .zip(other.d_name.iter()) |
1157 | | - .all(|(a, b)| a == b) |
1158 | | - } |
1159 | | - } |
1160 | | - impl Eq for dirent {} |
1161 | | - impl hash::Hash for dirent { |
1162 | | - fn hash<H: hash::Hasher>(&self, state: &mut H) { |
1163 | | - self.d_ino.hash(state); |
1164 | | - self.d_off.hash(state); |
1165 | | - self.d_reclen.hash(state); |
1166 | | - self.d_type.hash(state); |
1167 | | - self.d_name.hash(state); |
1168 | | - } |
1169 | | - } |
1170 | | - |
1171 | | - impl PartialEq for dirent64 { |
1172 | | - fn eq(&self, other: &dirent64) -> bool { |
1173 | | - self.d_ino == other.d_ino |
1174 | | - && self.d_off == other.d_off |
1175 | | - && self.d_reclen == other.d_reclen |
1176 | | - && self.d_type == other.d_type |
1177 | | - && self |
1178 | | - .d_name |
1179 | | - .iter() |
1180 | | - .zip(other.d_name.iter()) |
1181 | | - .all(|(a, b)| a == b) |
1182 | | - } |
1183 | | - } |
1184 | | - impl Eq for dirent64 {} |
1185 | | - impl hash::Hash for dirent64 { |
1186 | | - fn hash<H: hash::Hasher>(&self, state: &mut H) { |
1187 | | - self.d_ino.hash(state); |
1188 | | - self.d_off.hash(state); |
1189 | | - self.d_reclen.hash(state); |
1190 | | - self.d_type.hash(state); |
1191 | | - self.d_name.hash(state); |
1192 | | - } |
1193 | | - } |
1194 | | - |
1195 | | - impl PartialEq for mq_attr { |
1196 | | - fn eq(&self, other: &mq_attr) -> bool { |
1197 | | - self.mq_flags == other.mq_flags |
1198 | | - && self.mq_maxmsg == other.mq_maxmsg |
1199 | | - && self.mq_msgsize == other.mq_msgsize |
1200 | | - && self.mq_curmsgs == other.mq_curmsgs |
1201 | | - } |
1202 | | - } |
1203 | | - impl Eq for mq_attr {} |
1204 | | - impl hash::Hash for mq_attr { |
1205 | | - fn hash<H: hash::Hasher>(&self, state: &mut H) { |
1206 | | - self.mq_flags.hash(state); |
1207 | | - self.mq_maxmsg.hash(state); |
1208 | | - self.mq_msgsize.hash(state); |
1209 | | - self.mq_curmsgs.hash(state); |
1210 | | - } |
1211 | | - } |
1212 | | - |
1213 | | - impl PartialEq for sockaddr_nl { |
1214 | | - fn eq(&self, other: &sockaddr_nl) -> bool { |
1215 | | - self.nl_family == other.nl_family |
1216 | | - && self.nl_pid == other.nl_pid |
1217 | | - && self.nl_groups == other.nl_groups |
1218 | | - } |
1219 | | - } |
1220 | | - impl Eq for sockaddr_nl {} |
1221 | | - impl hash::Hash for sockaddr_nl { |
1222 | | - fn hash<H: hash::Hasher>(&self, state: &mut H) { |
1223 | | - self.nl_family.hash(state); |
1224 | | - self.nl_pid.hash(state); |
1225 | | - self.nl_groups.hash(state); |
1226 | | - } |
1227 | | - } |
1228 | | - |
1229 | | - // FIXME(msrv): suggested method was added in 1.85 |
1230 | | - #[allow(unpredictable_function_pointer_comparisons)] |
1231 | | - impl PartialEq for sigevent { |
1232 | | - fn eq(&self, other: &sigevent) -> bool { |
1233 | | - self.sigev_value == other.sigev_value |
1234 | | - && self.sigev_signo == other.sigev_signo |
1235 | | - && self.sigev_notify == other.sigev_notify |
1236 | | - && self.sigev_notify_function == other.sigev_notify_function |
1237 | | - && self.sigev_notify_attributes == other.sigev_notify_attributes |
1238 | | - } |
1239 | | - } |
1240 | | - impl Eq for sigevent {} |
1241 | | - impl hash::Hash for sigevent { |
1242 | | - fn hash<H: hash::Hasher>(&self, state: &mut H) { |
1243 | | - self.sigev_value.hash(state); |
1244 | | - self.sigev_signo.hash(state); |
1245 | | - self.sigev_notify.hash(state); |
1246 | | - self.sigev_notify_function.hash(state); |
1247 | | - self.sigev_notify_attributes.hash(state); |
1248 | | - } |
1249 | | - } |
1250 | | - |
1251 | | - impl PartialEq for pthread_cond_t { |
1252 | | - fn eq(&self, other: &pthread_cond_t) -> bool { |
1253 | | - self.size.iter().zip(other.size.iter()).all(|(a, b)| a == b) |
1254 | | - } |
1255 | | - } |
1256 | | - impl Eq for pthread_cond_t {} |
1257 | | - impl hash::Hash for pthread_cond_t { |
1258 | | - fn hash<H: hash::Hasher>(&self, state: &mut H) { |
1259 | | - self.size.hash(state); |
1260 | | - } |
1261 | | - } |
1262 | | - |
1263 | | - impl PartialEq for pthread_mutex_t { |
1264 | | - fn eq(&self, other: &pthread_mutex_t) -> bool { |
1265 | | - self.size.iter().zip(other.size.iter()).all(|(a, b)| a == b) |
1266 | | - } |
1267 | | - } |
1268 | | - impl Eq for pthread_mutex_t {} |
1269 | | - impl hash::Hash for pthread_mutex_t { |
1270 | | - fn hash<H: hash::Hasher>(&self, state: &mut H) { |
1271 | | - self.size.hash(state); |
1272 | | - } |
1273 | | - } |
1274 | | - |
1275 | | - impl PartialEq for pthread_rwlock_t { |
1276 | | - fn eq(&self, other: &pthread_rwlock_t) -> bool { |
1277 | | - self.size.iter().zip(other.size.iter()).all(|(a, b)| a == b) |
1278 | | - } |
1279 | | - } |
1280 | | - impl Eq for pthread_rwlock_t {} |
1281 | | - impl hash::Hash for pthread_rwlock_t { |
1282 | | - fn hash<H: hash::Hasher>(&self, state: &mut H) { |
1283 | | - self.size.hash(state); |
1284 | | - } |
1285 | | - } |
1286 | | - } |
1287 | | -} |
1288 | | - |
1289 | 1026 | // PUB_CONST |
1290 | 1027 |
|
1291 | 1028 | pub const INT_MIN: c_int = -2147483648; |
|
0 commit comments