summaryrefslogtreecommitdiff
path: root/signals.c
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-03-16 16:25:42 -0300
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-11-28 04:31:52 -0200
commite06eddafd5f72f6f0782e37e9617c2e874021038 (patch)
tree972a90ccba9466c6ac0d60b7d9d4576c6e5bcc23 /signals.c
parentf1a527497c9621428cdb78dd9d37cb846ec10544 (diff)
Compile warning fixes.
Include header with prototypes for signals.c, and change prototypes and definitions to match. This should not have any side effects as function arguments are ignored. Ansify some functions with K&R definitions. printhex.c:fprintfhex() could be changed to a "sane" implementation, but only change was "ansification".
Diffstat (limited to 'signals.c')
-rw-r--r--signals.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/signals.c b/signals.c
index 9be9bab..fb9c34d 100644
--- a/signals.c
+++ b/signals.c
@@ -98,15 +98,16 @@ in this Software without prior written authorization from The Open Group.
#include <stddef.h>
+#include "xsm.h"
+
int checkpoint_from_signal = 0;
extern XtSignalId sig_term_id, sig_usr1_id;
extern Bool wantShutdown;
-SIGVAL (*Signal (sig, handler))()
- int sig;
- SIGVAL (*handler)();
+static SIGVAL
+Signal(int sig, SIGVAL (*handler)(int))
{
#ifndef X_NOT_POSIX
struct sigaction sigact, osigact;
@@ -114,15 +115,20 @@ SIGVAL (*Signal (sig, handler))()
sigemptyset(&sigact.sa_mask);
sigact.sa_flags = 0;
sigaction(sig, &sigact, &osigact);
+# if defined(SIGNALRETURNSINT)
return osigact.sa_handler;
+# endif
#else
- return signal(sig, handler);
+# if defined(SIGNALRETURNSINT)
+ return
+# endif
+ signal(sig, handler);
#endif
}
void
-sig_child_handler (XtPointer closure, XtSignalId id)
+sig_child_handler (int sig)
{
int pid, olderrno = errno;
@@ -231,10 +237,7 @@ register_signals (XtAppContext appContext)
int
-execute_system_command (s)
-
-char *s;
-
+execute_system_command (char *s)
{
int stat;