diff --git a/configure.ac b/configure.ac index beb9deac6..045cf3022 100644 --- a/configure.ac +++ b/configure.ac @@ -1289,11 +1289,6 @@ AH_VERBATIM([_ZEND_EXPLICIT_DEFINITIONS], #define FMiniIconsSupported 0 #endif -#if RETSIGTYPE != void -#define SIGNAL_RETURN return 0 -#else -#define SIGNAL_RETURN return -#endif /* Allow GCC extensions to work, if you have GCC. */ #ifndef __attribute__ diff --git a/fvwm/fvwm3.c b/fvwm/fvwm3.c index 83f45534d..74767aff3 100644 --- a/fvwm/fvwm3.c +++ b/fvwm/fvwm3.c @@ -276,7 +276,7 @@ static void catch_exit(void) /* * Restart on a signal */ -static RETSIGTYPE +static void Restart(int sig) { fvwmRunState = FVWM_RESTART; @@ -286,18 +286,18 @@ Restart(int sig) * BEFORE we call it ... */ fvwmSetTerminate(sig); - SIGNAL_RETURN; + return; } -static RETSIGTYPE +static void ToggleLogging(int sig) { log_toggle(fvwm_userdir); - SIGNAL_RETURN; + return; } -static RETSIGTYPE +static void SigDone(int sig) { fvwmRunState = FVWM_DONE; @@ -307,7 +307,7 @@ SigDone(int sig) * BEFORE we call it ... */ fvwmSetTerminate(sig); - SIGNAL_RETURN; + return; } /* diff --git a/fvwm/module_list.c b/fvwm/module_list.c index 6b0d38092..3029a6eae 100644 --- a/fvwm/module_list.c +++ b/fvwm/module_list.c @@ -1054,9 +1054,9 @@ void FlushAllMessageQueues(void) /* empty, only here so that the signal handling initialization code is the * same for modules and fvwm */ -RETSIGTYPE DeadPipe(int sig) +void DeadPipe(int sig) { - SIGNAL_RETURN; + return; } void CMD_Module(F_CMD_ARGS) diff --git a/fvwm/module_list.h b/fvwm/module_list.h index 8652b8c88..5892aea4b 100644 --- a/fvwm/module_list.h +++ b/fvwm/module_list.h @@ -160,6 +160,6 @@ char *skipModuleAliasToken(const char *string); /* dead pipe signal handler - empty */ -RETSIGTYPE DeadPipe(int nonsense); +void DeadPipe(int nonsense); #endif /* MODULE_LIST_H */ diff --git a/libs/PictureImageLoader.c b/libs/PictureImageLoader.c index c5a80ced4..cbc4d5a87 100644 --- a/libs/PictureImageLoader.c +++ b/libs/PictureImageLoader.c @@ -603,7 +603,7 @@ Bool PImageLoadXpm(FIMAGE_CMD_ARGS) struct sigaction defaultHandler; struct sigaction originalHandler; #else - RETSIGTYPE (*originalHandler)(int); + void (*originalHandler)(int); #endif if (!XpmSupport) diff --git a/libs/fvwmsignal.c b/libs/fvwmsignal.c index 093c86381..f7cf28ee6 100644 --- a/libs/fvwmsignal.c +++ b/libs/fvwmsignal.c @@ -51,7 +51,7 @@ static jmp_buf deadJump; * We do this asynchronously within the SIGCHLD handler so that * "it just happens". */ -RETSIGTYPE +void fvwmReapChildren(int sig) { (void)sig; @@ -79,7 +79,7 @@ fvwmReapChildren(int sig) #endif BSD_UNBLOCK_SIGNALS; - SIGNAL_RETURN; + return; } #ifdef USE_BSD_SIGNALS diff --git a/libs/fvwmsignal.h b/libs/fvwmsignal.h index 4351b3889..7e565de4e 100644 --- a/libs/fvwmsignal.h +++ b/libs/fvwmsignal.h @@ -52,7 +52,7 @@ extern volatile sig_atomic_t isTerminated; /* * Module prototypes */ -RETSIGTYPE fvwmReapChildren(int sig); +void fvwmReapChildren(int sig); extern void fvwmSetTerminate(int sig); #ifdef USE_BSD_SIGNALS diff --git a/meson.build b/meson.build index b45807008..8d6edb15f 100644 --- a/meson.build +++ b/meson.build @@ -82,8 +82,6 @@ conf.set_quoted( conf.set_quoted('FVWM_DATADIR', fvwm_datadir) conf.set_quoted('LOCALEDIR', prefix / get_option('localedir')) conf.set_quoted('FVWM_CONFDIR', prefix / get_option('sysconfdir')) -conf.set('RETSIGTYPE', 'void') -conf.set('SIGNAL_RETURN', 'return') conf.set('ICONV_ARG_CONST', '') conf.set('fd_set_size_t', 'int') conf.set('EXECUTABLE_EXTENSION', 'NULL') diff --git a/modules/FvwmAnimate/FvwmAnimate.c b/modules/FvwmAnimate/FvwmAnimate.c index 9a0892169..e097276e9 100644 --- a/modules/FvwmAnimate/FvwmAnimate.c +++ b/modules/FvwmAnimate/FvwmAnimate.c @@ -153,7 +153,7 @@ static void AnimateResizeNone(int, int, int, int, int, int, int, int); static void AnimateResizeTwist(int, int, int, int, int, int, int, int); static void DefineForm(void); -static RETSIGTYPE HandleTerminate(int sig); +static void HandleTerminate(int sig); struct ASAnimate Animate = { NULL, NULL, ANIM_ITERATIONS, ANIM_DELAY, ANIM_TWIST, ANIM_WIDTH, @@ -748,14 +748,14 @@ void DeadPipe(int arg) { myfprintf((stderr,"Dead Pipe, arg %d\n",arg)); exit(0); - SIGNAL_RETURN; + return; } -static RETSIGTYPE +static void HandleTerminate(int sig) { fvwmSetTerminate(sig); - SIGNAL_RETURN; + return; } diff --git a/modules/FvwmAuto/FvwmAuto.c b/modules/FvwmAuto/FvwmAuto.c index 779d4c6ff..fa71f255d 100644 --- a/modules/FvwmAuto/FvwmAuto.c +++ b/modules/FvwmAuto/FvwmAuto.c @@ -62,7 +62,7 @@ #endif -static RETSIGTYPE TerminateHandler(int signo); +static void TerminateHandler(int signo); /* * @@ -70,12 +70,12 @@ static RETSIGTYPE TerminateHandler(int signo); * Termination procedure : *not* a signal handler * */ -RETSIGTYPE DeadPipe(int nonsense) +void DeadPipe(int nonsense) { (void)nonsense; myfprintf((stderr,"Leaving via DeadPipe\n")); exit(0); - SIGNAL_RETURN; + return; } /* @@ -84,11 +84,11 @@ RETSIGTYPE DeadPipe(int nonsense) * Signal handler that tells the module to quit * */ -static RETSIGTYPE +static void TerminateHandler(int signo) { fvwmSetTerminate(signo); - SIGNAL_RETURN; + return; } /* diff --git a/modules/FvwmBacker/FvwmBacker.c b/modules/FvwmBacker/FvwmBacker.c index 4e003f6ba..6302fc089 100644 --- a/modules/FvwmBacker/FvwmBacker.c +++ b/modules/FvwmBacker/FvwmBacker.c @@ -495,10 +495,10 @@ void ProcessMessage(unsigned long type, unsigned long *body) /* Detected a broken pipe - time to exit */ -RETSIGTYPE DeadPipe(int nonsense) +void DeadPipe(int nonsense) { exit(1); - SIGNAL_RETURN; + return; } /* diff --git a/modules/FvwmBacker/FvwmBacker.h b/modules/FvwmBacker/FvwmBacker.h index ae7f1737b..8103740ad 100644 --- a/modules/FvwmBacker/FvwmBacker.h +++ b/modules/FvwmBacker/FvwmBacker.h @@ -24,7 +24,7 @@ void EndLessLoop(void); void ReadFvwmPipe(void); void ProcessMessage(unsigned long type, unsigned long *body); -RETSIGTYPE DeadPipe(int nonsense); +void DeadPipe(int nonsense); void ParseConfig(void); int ParseConfigLine(char *line); void AddCommand(char *line); diff --git a/modules/FvwmButtons/FvwmButtons.c b/modules/FvwmButtons/FvwmButtons.c index 8be16df41..9b78c3f79 100644 --- a/modules/FvwmButtons/FvwmButtons.c +++ b/modules/FvwmButtons/FvwmButtons.c @@ -98,9 +98,9 @@ extern void SaveButtons(button_info *); /* ------------------------------ prototypes ------------------------------- */ -RETSIGTYPE DeadPipe(int nonsense); +void DeadPipe(int nonsense); static void DeadPipeCleanup(void); -static RETSIGTYPE TerminateHandler(int sig); +static void TerminateHandler(int sig); void SetButtonSize(button_info *, int, int); /* main */ void Loop(void); @@ -219,21 +219,21 @@ int IsThereADestroyEvent(button_info *b) *** Externally callable function to quit! Note that DeadPipeCleanup *** is an exit-procedure and so will be called automatically **/ -RETSIGTYPE DeadPipe(int whatever) +void DeadPipe(int whatever) { exit(0); - SIGNAL_RETURN; + return; } /** *** TerminateHandler() *** Signal handler that will make the event-loop terminate **/ -static RETSIGTYPE +static void TerminateHandler(int sig) { fvwmSetTerminate(sig); - SIGNAL_RETURN; + return; } /** diff --git a/modules/FvwmConsole/FvwmConsole.c b/modules/FvwmConsole/FvwmConsole.c index 96aa87151..8056c2c7b 100644 --- a/modules/FvwmConsole/FvwmConsole.c +++ b/modules/FvwmConsole/FvwmConsole.c @@ -41,7 +41,7 @@ char Name[80]; /* name of this program in executable format */ char *S_name = NULL; /* socket name */ void server(void); -RETSIGTYPE DeadPipe(int); +void DeadPipe(int); void ErrMsg(char *msg); void SigHandler(int); @@ -64,27 +64,27 @@ void clean_up(void) /* * signal handler */ -RETSIGTYPE DeadPipe(int dummy) +void DeadPipe(int dummy) { clean_up(); exit(0); - SIGNAL_RETURN; + return; } -RETSIGTYPE SigHandler(int dummy) +void SigHandler(int dummy) { clean_up(); exit(0); - SIGNAL_RETURN; + return; } -RETSIGTYPE ReapChildren(int sig) +void ReapChildren(int sig) { fvwmReapChildren(sig); - SIGNAL_RETURN; + return; } int main(int argc, char *argv[]) diff --git a/modules/FvwmConsole/FvwmConsoleC.c b/modules/FvwmConsole/FvwmConsoleC.c index 725465060..3ec130231 100644 --- a/modules/FvwmConsole/FvwmConsoleC.c +++ b/modules/FvwmConsole/FvwmConsoleC.c @@ -38,15 +38,15 @@ void sclose(int foo) } exit(0); - SIGNAL_RETURN; + return; } -RETSIGTYPE ReapChildren(int sig) +void ReapChildren(int sig) { fvwmReapChildren(sig); sclose(sig); - SIGNAL_RETURN; + return; } /* diff --git a/modules/FvwmEvent/FvwmEvent.c b/modules/FvwmEvent/FvwmEvent.c index 2240aa039..8832e39a0 100644 --- a/modules/FvwmEvent/FvwmEvent.c +++ b/modules/FvwmEvent/FvwmEvent.c @@ -76,8 +76,8 @@ typedef struct void execute_event(event_entry*, short, unsigned long*); void config(void); -RETSIGTYPE DeadPipe(int); -static RETSIGTYPE TerminateHandler(int); +void DeadPipe(int); +static void TerminateHandler(int); /* ---------------------------- local variables ----------------------------- */ @@ -679,12 +679,12 @@ void config(void) * SIGPIPE handler - SIGPIPE means fvwm is dying * */ -static RETSIGTYPE +static void TerminateHandler(int nonsense) { isTerminated = True; - SIGNAL_RETURN; + return; } /* @@ -693,9 +693,9 @@ TerminateHandler(int nonsense) * Externally callable procedure to quit * */ -RETSIGTYPE DeadPipe(int flag) +void DeadPipe(int flag) { execute_event(builtin_event_table, BUILTIN_SHUTDOWN, NULL); exit(flag); - SIGNAL_RETURN; + return; } diff --git a/modules/FvwmForm/FvwmForm.c b/modules/FvwmForm/FvwmForm.c index 40f6f718d..0eb7b457a 100644 --- a/modules/FvwmForm/FvwmForm.c +++ b/modules/FvwmForm/FvwmForm.c @@ -2559,11 +2559,11 @@ static void MainLoop(void) /* signal-handler to make the application quit */ -static RETSIGTYPE +static void TerminateHandler(int sig) { fvwmSetTerminate(sig); - SIGNAL_RETURN; + return; } /* signal-handler to make the timer work */ @@ -2624,7 +2624,7 @@ TimerHandler(evutil_socket_t fd, short ev, void *arg) RedrawTimeout(timer); } - SIGNAL_RETURN; + return; } @@ -2745,10 +2745,10 @@ int main (int argc, char **argv) } -RETSIGTYPE DeadPipe(int nonsense) +void DeadPipe(int nonsense) { exit(0); - SIGNAL_RETURN; + return; } /* diff --git a/modules/FvwmForm/FvwmForm.h b/modules/FvwmForm/FvwmForm.h index f1ce9ff85..97665cf7d 100644 --- a/modules/FvwmForm/FvwmForm.h +++ b/modules/FvwmForm/FvwmForm.h @@ -264,6 +264,6 @@ int FontWidth (XFontStruct *xfs); /* FvwmForm.c */ void RedrawFrame (XEvent *pev); /* FvwmForm.c */ char * ParseCommand (int, char *, char, int *, char **s); /* ParseCommand.c */ -RETSIGTYPE DeadPipe(int nonsense); /* FvwmForm.c */ +void DeadPipe(int nonsense); /* FvwmForm.c */ #endif diff --git a/modules/FvwmIconMan/FvwmIconMan.c b/modules/FvwmIconMan/FvwmIconMan.c index ac6677de3..4669d8125 100644 --- a/modules/FvwmIconMan/FvwmIconMan.c +++ b/modules/FvwmIconMan/FvwmIconMan.c @@ -35,7 +35,7 @@ char *MyName; FlocaleWinString *FwinString; int mods_unused = DEFAULT_MODS_UNUSED; -static RETSIGTYPE TerminateHandler(int); +static void TerminateHandler(int); char *copy_string(char **target, const char *src) { @@ -115,11 +115,11 @@ void PrintMemuse(void) #endif -static RETSIGTYPE +static void TerminateHandler(int sig) { fvwmSetTerminate(sig); - SIGNAL_RETURN; + return; } @@ -135,7 +135,7 @@ DeadPipe(int nothing) { (void)nothing; ShutMeDown(0); - SIGNAL_RETURN; + return; } static void diff --git a/modules/FvwmIconMan/FvwmIconMan.h b/modules/FvwmIconMan/FvwmIconMan.h index ee46a64ae..59b4e8d2f 100644 --- a/modules/FvwmIconMan/FvwmIconMan.h +++ b/modules/FvwmIconMan/FvwmIconMan.h @@ -387,7 +387,7 @@ extern int mods_unused; extern void ReadFvwmPipe(void); extern void Free (void *p); extern void ShutMeDown (int flag) __attribute__ ((__noreturn__)); -extern RETSIGTYPE DeadPipe (int nothing); +extern void DeadPipe (int nothing); extern char *copy_string (char **target, const char *src); extern void init_globals (void); diff --git a/modules/FvwmIdent/FvwmIdent.c b/modules/FvwmIdent/FvwmIdent.c index f60ef65da..dab722547 100644 --- a/modules/FvwmIdent/FvwmIdent.c +++ b/modules/FvwmIdent/FvwmIdent.c @@ -57,7 +57,7 @@ #include "FvwmIdent.h" -static RETSIGTYPE TerminateHandler(int); +static void TerminateHandler(int); static ModuleArgs *module; static fd_set_size_t fd_width; @@ -357,11 +357,11 @@ void process_message(unsigned long type,unsigned long *body) * SIGPIPE handler - SIGPIPE means fvwm is dying * */ -static RETSIGTYPE +static void TerminateHandler(int sig) { fvwmSetTerminate(sig); - SIGNAL_RETURN; + return; } /* diff --git a/modules/FvwmIdent/FvwmIdent.h b/modules/FvwmIdent/FvwmIdent.h index d397f4e16..7f1b0d2ee 100644 --- a/modules/FvwmIdent/FvwmIdent.h +++ b/modules/FvwmIdent/FvwmIdent.h @@ -50,7 +50,7 @@ struct Item * */ void Loop(int *fd); -RETSIGTYPE DeadPipe(int nonsense) __attribute__((noreturn)); +void DeadPipe(int nonsense) __attribute__((noreturn)); void process_message(unsigned long type, unsigned long *body); void PixmapDrawWindow(int h, int w); void DrawItems(Drawable d, int x, int y, int w, int h); diff --git a/modules/FvwmPager/FvwmPager.c b/modules/FvwmPager/FvwmPager.c index f540d5a33..6af203a66 100644 --- a/modules/FvwmPager/FvwmPager.c +++ b/modules/FvwmPager/FvwmPager.c @@ -128,7 +128,7 @@ static int x_fd; static fd_set_size_t fd_width; static void Loop(int *fd); -static RETSIGTYPE TerminateHandler(int); +static void TerminateHandler(int); static int My_XNextEvent(Display *dpy, XEvent *event); /* Procedure: main - start of module */ @@ -341,18 +341,18 @@ void Loop(int *fd) * Procedure: * SIGPIPE handler - SIGPIPE means fvwm is dying */ -static RETSIGTYPE TerminateHandler(int sig) +static void TerminateHandler(int sig) { fvwmSetTerminate(sig); - SIGNAL_RETURN; + return; } #if 0 /* Is this used? */ -RETSIGTYPE DeadPipe(int nonsense) +void DeadPipe(int nonsense) { exit(0); - SIGNAL_RETURN; + return; } #endif diff --git a/modules/FvwmRearrange/FvwmRearrange.c b/modules/FvwmRearrange/FvwmRearrange.c index c51a7233c..e44ae4859 100644 --- a/modules/FvwmRearrange/FvwmRearrange.c +++ b/modules/FvwmRearrange/FvwmRearrange.c @@ -92,10 +92,10 @@ int FvwmTile = 0; int FvwmCascade = 1; -RETSIGTYPE DeadPipe(int sig) +void DeadPipe(int sig) { exit(0); - SIGNAL_RETURN; + return; } void insert_window_list(window_list *wl, window_item *i) diff --git a/modules/FvwmScript/FvwmScript.c b/modules/FvwmScript/FvwmScript.c index f3ca258a0..4179bd06b 100644 --- a/modules/FvwmScript/FvwmScript.c +++ b/modules/FvwmScript/FvwmScript.c @@ -234,11 +234,11 @@ static void TryToFind(char *filename) { } /* Exiting with Delete button */ -RETSIGTYPE DeadPipe(int nonsense) +void DeadPipe(int nonsense) { is_dead_pipe = True; Quit (0,NULL); - SIGNAL_RETURN; + return; } /* Reading system.fvwmrc or .fvwmrc file */ @@ -1346,11 +1346,11 @@ void ReadFvwmScriptArg(int argc, char **argv,int IsFather) /* signal handler to close down the module */ -static RETSIGTYPE +static void TerminateHandler(int sig) { fvwmSetTerminate(sig); - SIGNAL_RETURN; + return; }