comparison src/sysdep.c @ 20498:22dd2d861e36

(sys_signal): Undo previous change.
author Richard M. Stallman <rms@gnu.org>
date Sun, 21 Dec 1997 02:28:52 +0000
parents 16c41f2c329d
children a9a9a13079b4
comparison
equal deleted inserted replaced
20497:0d0951bf17fa 20498:22dd2d861e36
2738 2738
2739 signal_handler_t 2739 signal_handler_t
2740 sys_signal (int signal_number, signal_handler_t action) 2740 sys_signal (int signal_number, signal_handler_t action)
2741 { 2741 {
2742 sigemptyset (&new_action.sa_mask); 2742 sigemptyset (&new_action.sa_mask);
2743 new_action.sa_handler = (void (*)(int)) action; 2743 new_action.sa_handler = action;
2744 #ifdef SA_RESTART 2744 #ifdef SA_RESTART
2745 /* Emacs mostly works better with restartable system services. If this 2745 /* Emacs mostly works better with restartable system services. If this
2746 * flag exists, we probably want to turn it on here. 2746 * flag exists, we probably want to turn it on here.
2747 */ 2747 */
2748 new_action.sa_flags = SA_RESTART; 2748 new_action.sa_flags = SA_RESTART;
2749 #else 2749 #else
2750 new_action.sa_flags = 0; 2750 new_action.sa_flags = 0;
2751 #endif 2751 #endif
2752 sigaction (signal_number, &new_action, &old_action); 2752 sigaction (signal_number, &new_action, &old_action);
2753 return ((void (*)(int)) old_action.sa_handler); 2753 return (old_action.sa_handler);
2754 } 2754 }
2755 2755
2756 #ifndef __GNUC__ 2756 #ifndef __GNUC__
2757 /* If we're compiling with GCC, we don't need this function, since it 2757 /* If we're compiling with GCC, we don't need this function, since it
2758 can be written as a macro. */ 2758 can be written as a macro. */