From 96b9b22cb203905bcec0136e94f34e0850a34faa Mon Sep 17 00:00:00 2001 From: "Carlos R. Mafra" Date: Sat, 17 Oct 2009 01:05:28 +0200 Subject: [PATCH] Remove #ifdef SYS_SIGLIST_DECLARED constructs SYS_SIGLIST_DECLARED was defined nowhere and it was clearly some dead code. --- src/dialog.c | 4 ---- src/startup.c | 28 ---------------------------- 2 files changed, 32 deletions(-) diff --git a/src/dialog.c b/src/dialog.c index 4fb0790c..fd300ac5 100644 --- a/src/dialog.c +++ b/src/dialog.c @@ -1954,11 +1954,7 @@ int wShowCrashingDialogPanel(int whatSig) WMResizeWidget(panel->noteL, PWIDTH - 20, 40); WMMoveWidget(panel->noteL, 10, 90); WMSetLabelTextAlignment(panel->noteL, WAJustified); -#ifdef SYS_SIGLIST_DECLARED - snprintf(buf, sizeof(buf), _("Window Maker received signal %i\n(%s)."), whatSig, sys_siglist[whatSig]); -#else snprintf(buf, sizeof(buf), _("Window Maker received signal %i."), whatSig); -#endif WMSetLabelText(panel->noteL, buf); panel->note2L = WMCreateLabel(panel->win); diff --git a/src/startup.c b/src/startup.c index 013845e8..90f24621 100644 --- a/src/startup.c +++ b/src/startup.c @@ -66,12 +66,6 @@ #include "xutil.h" -#if 0 -#ifdef SYS_SIGLIST_DECLARED -extern const char *const sys_siglist[]; -#endif -#endif - /* for SunOS */ #ifndef SA_RESTART # define SA_RESTART 0 @@ -240,32 +234,14 @@ static RETSIGTYPE handleExitSig(int sig) sigprocmask(SIG_BLOCK, &sigs, NULL); if (sig == SIGUSR1) { -#ifdef SYS_SIGLIST_DECLARED - wwarning("got signal %i (%s) - restarting\n", sig, sys_siglist[sig]); -#else wwarning("got signal %i - restarting\n", sig); -#endif - SIG_WCHANGE_STATE(WSTATE_NEED_RESTART); - } else if (sig == SIGUSR2) { -#ifdef SYS_SIGLIST_DECLARED - wwarning("got signal %i (%s) - rereading defaults\n", sig, sys_siglist[sig]); -#else wwarning("got signal %i - rereading defaults\n", sig); -#endif - SIG_WCHANGE_STATE(WSTATE_NEED_REREAD); - } else if (sig == SIGTERM || sig == SIGINT || sig == SIGHUP) { -#ifdef SYS_SIGLIST_DECLARED - wwarning("got signal %i (%s) - exiting...\n", sig, sys_siglist[sig]); -#else wwarning("got signal %i - exiting...\n", sig); -#endif - SIG_WCHANGE_STATE(WSTATE_NEED_EXIT); - } sigprocmask(SIG_UNBLOCK, &sigs, NULL); @@ -285,11 +261,7 @@ static void dummyHandler(int sig) */ static RETSIGTYPE handleSig(int sig) { -#ifdef SYS_SIGLIST_DECLARED - wfatal("got signal %i (%s)\n", sig, sys_siglist[sig]); -#else wfatal("got signal %i\n", sig); -#endif /* Setting the signal behaviour back to default and then reraising the * signal is a cleaner way to make program exit and core dump than calling -- 2.11.4.GIT