@@ -1233,64 +1233,66 @@ f! {
12331233 * slot = 0 ;
12341234 }
12351235 }
1236+ }
12361237
1237- pub fn WIFSTOPPED ( status: :: c_int) -> bool {
1238+ safe_f ! {
1239+ pub { const } fn WIFSTOPPED ( status: :: c_int) -> bool {
12381240 ( status & 0xff ) == 0x7f
12391241 }
12401242
1241- pub fn WSTOPSIG ( status: :: c_int) -> :: c_int {
1243+ pub { const } fn WSTOPSIG ( status: :: c_int) -> :: c_int {
12421244 ( status >> 8 ) & 0xff
12431245 }
12441246
1245- pub fn WIFCONTINUED ( status: :: c_int) -> bool {
1247+ pub { const } fn WIFCONTINUED ( status: :: c_int) -> bool {
12461248 status == 0xffff
12471249 }
12481250
1249- pub fn WIFSIGNALED ( status: :: c_int) -> bool {
1251+ pub { const } fn WIFSIGNALED ( status: :: c_int) -> bool {
12501252 ( ( status & 0x7f ) + 1 ) as i8 >= 2
12511253 }
12521254
1253- pub fn WTERMSIG ( status: :: c_int) -> :: c_int {
1255+ pub { const } fn WTERMSIG ( status: :: c_int) -> :: c_int {
12541256 status & 0x7f
12551257 }
12561258
1257- pub fn WIFEXITED ( status: :: c_int) -> bool {
1259+ pub { const } fn WIFEXITED ( status: :: c_int) -> bool {
12581260 ( status & 0x7f ) == 0
12591261 }
12601262
1261- pub fn WEXITSTATUS ( status: :: c_int) -> :: c_int {
1263+ pub { const } fn WEXITSTATUS ( status: :: c_int) -> :: c_int {
12621264 ( status >> 8 ) & 0xff
12631265 }
12641266
1265- pub fn WCOREDUMP ( status: :: c_int) -> bool {
1267+ pub { const } fn WCOREDUMP ( status: :: c_int) -> bool {
12661268 ( status & 0x80 ) != 0
12671269 }
12681270
1269- pub fn W_EXITCODE ( ret: :: c_int, sig: :: c_int) -> :: c_int {
1271+ pub { const } fn W_EXITCODE ( ret: :: c_int, sig: :: c_int) -> :: c_int {
12701272 ( ret << 8 ) | sig
12711273 }
12721274
1273- pub fn W_STOPCODE ( sig: :: c_int) -> :: c_int {
1275+ pub { const } fn W_STOPCODE ( sig: :: c_int) -> :: c_int {
12741276 ( sig << 8 ) | 0x7f
12751277 }
12761278
1277- pub fn QCMD ( cmd: :: c_int, type_: :: c_int) -> :: c_int {
1279+ pub { const } fn QCMD ( cmd: :: c_int, type_: :: c_int) -> :: c_int {
12781280 ( cmd << 8 ) | ( type_ & 0x00ff )
12791281 }
12801282
1281- pub fn IPOPT_COPIED ( o: u8 ) -> u8 {
1283+ pub { const } fn IPOPT_COPIED ( o: u8 ) -> u8 {
12821284 o & IPOPT_COPY
12831285 }
12841286
1285- pub fn IPOPT_CLASS ( o: u8 ) -> u8 {
1287+ pub { const } fn IPOPT_CLASS ( o: u8 ) -> u8 {
12861288 o & IPOPT_CLASS_MASK
12871289 }
12881290
1289- pub fn IPOPT_NUMBER ( o: u8 ) -> u8 {
1291+ pub { const } fn IPOPT_NUMBER ( o: u8 ) -> u8 {
12901292 o & IPOPT_NUMBER_MASK
12911293 }
12921294
1293- pub fn IPTOS_ECN ( x: u8 ) -> u8 {
1295+ pub { const } fn IPTOS_ECN ( x: u8 ) -> u8 {
12941296 x & :: IPTOS_ECN_MASK
12951297 }
12961298}
0 commit comments