summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-02-23 10:02:50 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-02-23 10:02:50 -0800
commitef04ccaac0e501612367c098410129f89e1d109a (patch)
treec458f74ac425b17242285df06014c710da8c1e9a
parent27846ea3e133dbb45a4e67500eba15bf5d6c796c (diff)
downloadiceauth-ef04ccaac0e501612367c098410129f89e1d109a.tar.gz
Assume signal handlers return void, as C89 requires
Drops use of autoconf's obsolete AC_TYPE_SIGNAL and Imake's even more obsolete SIGNALRETURNSINT. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--configure.ac4
-rw-r--r--process.c20
2 files changed, 2 insertions, 22 deletions
diff --git a/configure.ac b/configure.ac
index 525e9d7..30caccc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,10 +33,6 @@ AC_CONFIG_HEADERS([config.h])
m4_ifndef([XORG_MACROS_VERSION],
[m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.8)
-
-
-AC_TYPE_SIGNAL
-
XORG_DEFAULT_OPTIONS
# Checks for pkg-config packages
diff --git a/process.c b/process.c
index 1a104b1..dfefe8e 100644
--- a/process.c
+++ b/process.c
@@ -469,31 +469,18 @@ static Bool iceauth_allowed = True; /* if allowed to write auth file */
static char *iceauth_filename = NULL;
static volatile Bool dieing = False;
-#ifdef RETSIGTYPE /* autoconf AC_TYPE_SIGNAL */
-# define _signal_t RETSIGTYPE
-#else /* Imake */
-#ifdef SIGNALRETURNSINT
-#define _signal_t int
-#else
-#define _signal_t void
-#endif
-#endif /* RETSIGTYPE */
-
/* poor man's puts(), for under signal handlers */
#define WRITES(fd, S) (void)write((fd), (S), strlen((S)))
/* ARGSUSED */
-static _signal_t die (int sig)
+static void die (int sig)
{
dieing = True;
_exit (auth_finalize ());
/* NOTREACHED */
-#ifdef SIGNALRETURNSINT
- return -1; /* for picky compilers */
-#endif
}
-static _signal_t catchsig (int sig)
+static void catchsig (int sig)
{
#ifdef SYSV
if (sig > 0) signal (sig, die); /* re-establish signal handler */
@@ -509,9 +496,6 @@ static _signal_t catchsig (int sig)
#endif
die (sig);
/* NOTREACHED */
-#ifdef SIGNALRETURNSINT
- return -1; /* for picky compilers */
-#endif
}
static void register_signals (void)