@@ -784,7 +784,6 @@ impl SigAction {
784
784
/// is the `SigAction` variant). `mask` specifies other signals to block during execution of
785
785
/// the signal-catching function.
786
786
pub fn new( handler: SigHandler , flags: SaFlags , mask: SigSet ) -> SigAction {
787
- #[ cfg( not( target_os = "aix" ) ) ]
788
787
unsafe fn install_sig( p: * mut libc:: sigaction, handler: SigHandler ) {
789
788
unsafe {
790
789
( * p) . sa_sigaction = match handler {
@@ -797,18 +796,6 @@ impl SigAction {
797
796
}
798
797
}
799
798
800
- #[ cfg( target_os = "aix" ) ]
801
- unsafe fn install_sig( p: * mut libc:: sigaction, handler: SigHandler ) {
802
- unsafe {
803
- ( * p) . sa_union. __su_sigaction = match handler {
804
- SigHandler :: SigDfl => unsafe { mem:: transmute:: <usize , extern "C" fn ( libc:: c_int, * mut libc:: siginfo_t, * mut libc:: c_void) >( libc:: SIG_DFL ) } ,
805
- SigHandler :: SigIgn => unsafe { mem:: transmute:: <usize , extern "C" fn ( libc:: c_int, * mut libc:: siginfo_t, * mut libc:: c_void) >( libc:: SIG_IGN ) } ,
806
- SigHandler :: Handler ( f) => unsafe { mem:: transmute:: <extern "C" fn ( i32 ) , extern "C" fn ( i32 , * mut libc:: siginfo_t, * mut libc:: c_void) >( f) } ,
807
- SigHandler :: SigAction ( f) => f,
808
- } ;
809
- }
810
- }
811
-
812
799
let mut s = mem:: MaybeUninit :: <libc:: sigaction>:: uninit( ) ;
813
800
unsafe {
814
801
let p = s. as_mut_ptr( ) ;
@@ -836,7 +823,6 @@ impl SigAction {
836
823
}
837
824
838
825
/// Returns the action's handler.
839
- #[ cfg( not( target_os = "aix" ) ) ]
840
826
pub fn handler( & self ) -> SigHandler {
841
827
match self . sigaction. sa_sigaction {
842
828
libc:: SIG_DFL => SigHandler :: SigDfl ,
@@ -869,26 +855,6 @@ impl SigAction {
869
855
as extern "C" fn ( libc:: c_int) ) ,
870
856
}
871
857
}
872
-
873
- /// Returns the action's handler.
874
- #[ cfg( target_os = "aix" ) ]
875
- pub fn handler( & self ) -> SigHandler {
876
- unsafe {
877
- match self . sigaction. sa_union. __su_sigaction as usize {
878
- libc:: SIG_DFL => SigHandler :: SigDfl ,
879
- libc:: SIG_IGN => SigHandler :: SigIgn ,
880
- p if self . flags( ) . contains( SaFlags :: SA_SIGINFO ) =>
881
- SigHandler :: SigAction (
882
- * ( & p as * const usize
883
- as * const extern "C" fn ( _, _, _) )
884
- as extern "C" fn ( _, _, _) ) ,
885
- p => SigHandler :: Handler (
886
- * ( & p as * const usize
887
- as * const extern "C" fn ( libc:: c_int) )
888
- as extern "C" fn ( libc:: c_int) ) ,
889
- }
890
- }
891
- }
892
858
}
893
859
894
860
/// Changes the action taken by a process on receipt of a specific signal.
0 commit comments