@@ -369,7 +369,7 @@ const SIGNALS: [Signal; 31] = [
369
369
370
370
// Support for real-time signals
371
371
/// Operating system signal value
372
- #[ cfg( target_os = "linux" ) ]
372
+ #[ cfg( all ( target_os = "linux" , not ( target_arch = "mips" ) ) ) ]
373
373
#[ cfg( any( feature = "aio" , feature = "signal" ) ) ]
374
374
#[ derive( Clone , Copy , Debug , PartialEq , Eq , PartialOrd , Ord , Hash ) ]
375
375
pub enum SignalValue {
@@ -381,7 +381,7 @@ pub enum SignalValue {
381
381
382
382
// Support for real-time signals
383
383
/// Operating system signal value
384
- #[ cfg( not( target_os = "linux" ) ) ]
384
+ #[ cfg( any ( not( target_os = "linux" ) , all ( target_os = "linux" , target_arch = "mips" ) ) ) ]
385
385
#[ cfg( any( feature = "signal" , feature = "aio" ) ) ]
386
386
#[ derive( Clone , Copy , Debug , PartialEq , Eq , PartialOrd , Ord , Hash ) ]
387
387
pub enum SignalValue {
@@ -391,7 +391,7 @@ pub enum SignalValue {
391
391
392
392
#[ cfg( any( feature = "aio" , feature = "signal" ) ) ]
393
393
impl SignalValue {
394
- #[ cfg( target_os = "linux" ) ]
394
+ #[ cfg( all ( target_os = "linux" , not ( target_arch = "mips" ) ) ) ]
395
395
#[ allow( dead_code) ]
396
396
unsafe fn convert_to_int_unchecked ( self ) -> libc:: c_int {
397
397
// Note: dead code is allowed, since this is a private method that can remain unused on some platforms
@@ -401,7 +401,7 @@ impl SignalValue {
401
401
}
402
402
}
403
403
404
- #[ cfg( not( target_os = "linux" ) ) ]
404
+ #[ cfg( any ( not( target_os = "linux" ) , all ( target_os = "linux" , target_arch = "mips" ) ) ) ]
405
405
#[ allow( dead_code) ]
406
406
unsafe fn convert_to_int_unchecked ( self ) -> libc:: c_int {
407
407
// Note: dead code is allowed, since this is a private method that can remain unused on some platforms
@@ -411,7 +411,7 @@ impl SignalValue {
411
411
}
412
412
413
413
/// Check whether this enum contains a valid signal for this operating system
414
- #[ cfg( target_os = "linux" ) ]
414
+ #[ cfg( all ( target_os = "linux" , not ( target_arch = "mips" ) ) ) ]
415
415
pub fn is_valid ( & self ) -> bool {
416
416
match self {
417
417
SignalValue :: Standard ( _) => true ,
@@ -422,7 +422,7 @@ impl SignalValue {
422
422
}
423
423
424
424
/// Check whether this enum contains a valid signal for this operating system
425
- #[ cfg( not( target_os = "linux" ) ) ]
425
+ #[ cfg( any ( not( target_os = "linux" ) , all ( target_os = "linux" , target_arch = "mips" ) ) ) ]
426
426
pub fn is_valid ( & self ) -> bool {
427
427
match self {
428
428
SignalValue :: Standard ( _) => true ,
@@ -432,7 +432,7 @@ impl SignalValue {
432
432
433
433
#[ cfg( feature = "signal" ) ]
434
434
impl From < SignalValue > for String {
435
- #[ cfg( target_os = "linux" ) ]
435
+ #[ cfg( all ( target_os = "linux" , not ( target_arch = "mips" ) ) ) ]
436
436
fn from ( x : SignalValue ) -> Self {
437
437
match x {
438
438
SignalValue :: Standard ( s) => s. to_string ( ) ,
@@ -442,7 +442,7 @@ impl From<SignalValue> for String {
442
442
}
443
443
}
444
444
445
- #[ cfg( not( target_os = "linux" ) ) ]
445
+ #[ cfg( any ( not( target_os = "linux" ) , all ( target_os = "linux" , target_arch = "mips" ) ) ) ]
446
446
fn from ( x : SignalValue ) -> Self {
447
447
match x {
448
448
SignalValue :: Standard ( s) => s. to_string ( ) ,
@@ -454,7 +454,7 @@ impl From<SignalValue> for String {
454
454
impl TryFrom < i32 > for SignalValue {
455
455
type Error = Errno ;
456
456
457
- #[ cfg( target_os = "linux" ) ]
457
+ #[ cfg( all ( target_os = "linux" , not ( target_arch = "mips" ) ) ) ]
458
458
fn try_from ( x : i32 ) -> Result < Self > {
459
459
if x < libc:: SIGRTMIN ( ) {
460
460
match Signal :: try_from ( x) {
@@ -466,7 +466,7 @@ impl TryFrom<i32> for SignalValue {
466
466
}
467
467
}
468
468
469
- #[ cfg( not( target_os = "linux" ) ) ]
469
+ #[ cfg( any ( not( target_os = "linux" ) , all ( target_os = "linux" , target_arch = "mips" ) ) ) ]
470
470
fn try_from ( x : i32 ) -> Result < Self > {
471
471
match Signal :: try_from ( x) {
472
472
Ok ( s) => Ok ( SignalValue :: Standard ( s) ) ,
@@ -479,7 +479,7 @@ impl TryFrom<i32> for SignalValue {
479
479
impl TryFrom < SignalValue > for i32 {
480
480
type Error = Errno ;
481
481
482
- #[ cfg( target_os = "linux" ) ]
482
+ #[ cfg( all ( target_os = "linux" , not ( target_arch = "mips" ) ) ) ]
483
483
fn try_from ( x : SignalValue ) -> Result < Self > {
484
484
match x {
485
485
SignalValue :: Standard ( s) => Ok ( s as i32 ) ,
@@ -494,7 +494,7 @@ impl TryFrom<SignalValue> for i32 {
494
494
}
495
495
}
496
496
497
- #[ cfg( not( target_os = "linux" ) ) ]
497
+ #[ cfg( any ( not( target_os = "linux" ) , all ( target_os = "linux" , target_arch = "mips" ) ) ) ]
498
498
fn try_from ( x : SignalValue ) -> Result < Self > {
499
499
match x {
500
500
SignalValue :: Standard ( s) => Ok ( s as i32 ) ,
@@ -513,15 +513,15 @@ impl From<Signal> for SignalValue {
513
513
impl TryFrom < SignalValue > for Signal {
514
514
type Error = Errno ;
515
515
516
- #[ cfg( target_os = "linux" ) ]
516
+ #[ cfg( all ( target_os = "linux" , not ( target_arch = "mips" ) ) ) ]
517
517
fn try_from ( x : SignalValue ) -> Result < Self > {
518
518
match x {
519
519
SignalValue :: Standard ( s) => Ok ( s) ,
520
520
SignalValue :: Realtime ( _) => Err ( Errno :: EINVAL ) ,
521
521
}
522
522
}
523
523
524
- #[ cfg( not( target_os = "linux" ) ) ]
524
+ #[ cfg( any ( not( target_os = "linux" ) , all ( target_os = "linux" , target_arch = "mips" ) ) ) ]
525
525
fn try_from ( x : SignalValue ) -> Result < Self > {
526
526
match x {
527
527
SignalValue :: Standard ( s) => Ok ( s) ,
@@ -561,7 +561,7 @@ impl Iterator for SignalIterator {
561
561
impl Iterator for SignalValueIterator {
562
562
type Item = SignalValue ;
563
563
564
- #[ cfg( target_os = "linux" ) ]
564
+ #[ cfg( all ( target_os = "linux" , not ( target_arch = "mips" ) ) ) ]
565
565
fn next( & mut self ) -> Option <SignalValue > {
566
566
let next_signal = match SignalValue :: try_from( self . next) {
567
567
Ok ( s) => {
@@ -578,7 +578,7 @@ impl Iterator for SignalValueIterator {
578
578
if next_signal. is_valid( ) { Some ( next_signal) } else { None }
579
579
}
580
580
581
- #[ cfg( not( target_os = "linux" ) ) ]
581
+ #[ cfg( any ( not( target_os = "linux" ) , all ( target_os = "linux" , target_arch = "mips" ) ) ) ]
582
582
fn next( & mut self ) -> Option <SignalValue > {
583
583
let next_signal = match SignalValue :: try_from( self . next) {
584
584
Ok ( s) => {
0 commit comments