[PATCH app-xedit] Remove obsolete Imake SIGNALRETURNSINT
Gaetan Nadon
memsize at videotron.ca
Tue Dec 17 08:32:22 PST 2013
Assume signal handlers return void, as C89 requires
Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
ispell.c | 19 -------------------
lisp/lisp.c | 15 +--------------
lisp/private.h | 5 -----
lisp/xedit.c | 14 +-------------
4 files changed, 2 insertions(+), 51 deletions(-)
diff --git a/ispell.c b/ispell.c
index 842927c..248224b 100644
--- a/ispell.c
+++ b/ispell.c
@@ -181,13 +181,8 @@ static void ReplaceIspell(Widget, XtPointer, XtPointer);
static void RevertIspell(Widget, XtPointer, XtPointer);
static void SelectIspell(Widget, XtPointer, XtPointer);
static void ToggleTerseIspell(Widget, XtPointer, XtPointer);
-#ifndef SIGNALRETURNSINT
static void timeout_signal(int);
static void (*old_timeout)(int);
-#else
-static int timeout_signal(int);
-static int (*old_timeout)(int);
-#endif
static void UndoIspell(Widget, XtPointer, XtPointer);
Bool _XawTextSrcUndo(TextSrcObject, XawTextPosition*);
@@ -312,7 +307,6 @@ IsUpper(int ch)
#endif
/*ARGSUSED*/
-#ifndef SIGNALRETURNSINT
static void
timeout_signal(int unused)
{
@@ -322,19 +316,6 @@ timeout_signal(int unused)
kill(ispell.pid, SIGTERM);
errno = olderrno;
}
-#else
-static int
-timeout_signal(int unused)
-{
- int olderrno = errno;
-
- WRITES("Warning: Timeout waiting ispell process to die.\n");
- kill(ispell.pid, SIGTERM);
-
- errno = olderrno;
- return (0);
-}
-#endif
static void
IspellSetSelection(XawTextPosition left, XawTextPosition right)
diff --git a/lisp/lisp.c b/lisp/lisp.c
index 206c038..411240a 100644
--- a/lisp/lisp.c
+++ b/lisp/lisp.c
@@ -158,13 +158,7 @@ static INLINE void LispProt(LispObj*);
static LispObj *LispCheckNeedProtect(LispObj*);
-static
-#ifdef SIGNALRETURNSINT
-int
-#else
-void
-#endif
-LispSignalHandler(int);
+static void LispSignalHandler(int);
/*
* Initialization
@@ -5009,17 +5003,10 @@ LispUpdateResults(LispObj *cod, LispObj *res)
LispSetVar(RES[0], res);
}
-#ifdef SIGNALRETURNSINT
-int
-#else
void
-#endif
LispSignalHandler(int signum)
{
LispSignal(signum);
-#ifdef SIGNALRETURNSINT
- return (0);
-#endif
}
void
diff --git a/lisp/private.h b/lisp/private.h
index ef44ab2..2e5b634 100644
--- a/lisp/private.h
+++ b/lisp/private.h
@@ -388,13 +388,8 @@ struct _LispMac {
#endif
LispObj *prolist; /* protect objects list */
-#ifdef SIGNALRETURNSINT
- int (*sigint)(int);
- int (*sigfpe)(int);
-#else
void (*sigint)(int);
void (*sigfpe)(int);
-#endif
int destroyed; /* reached LispDestroy, used by unwind-protect */
int running; /* there is somewhere to siglongjmp */
diff --git a/lisp/xedit.c b/lisp/xedit.c
index a337912..8f191dc 100644
--- a/lisp/xedit.c
+++ b/lisp/xedit.c
@@ -98,11 +98,7 @@ static LispObj *XeditSearch(LispBuiltin*, XawTextScanDirection);
/*
* Initialization
*/
-#ifdef SIGNALRETURNSINT
-static int (*old_sigalrm)(int);
-#else
static void (*old_sigalrm)(int);
-#endif
EditModeInfo *mode_infos;
Cardinal num_mode_infos;
@@ -177,12 +173,7 @@ ControlGPredicate(Display *display, XEvent *event, XPointer arguments)
}
/*ARGSUSED*/
-static
-#ifdef SIGNALRETURNSINT
-int
-#else
-void
-#endif
+static void
SigalrmHandler(int signum)
{
XEvent event;
@@ -201,9 +192,6 @@ SigalrmHandler(int signum)
}
else
alarm(1);
-#ifdef SIGNALRETURNSINT
- return (0);
-#endif
}
static ssize_t
--
1.7.9.5
More information about the xorg-devel
mailing list