From 692771fb0745a063052b7d4ffc2e4be7aeca002b Mon Sep 17 00:00:00 2001 From: OBATA Akio Date: Sun, 19 Sep 2021 18:08:41 +0900 Subject: [PATCH] Get rid of support of ancient signal handler return type int Such environments are missing void type, older K&R C, and such supports already had been removed in various places. Furthermore, current hardcoded 'SIGNALRETURNSINT' is wrong. --- cde/lib/tt/bin/ttauth/Makefile.am | 2 +- cde/lib/tt/bin/ttauth/process.c | 16 ++-------------- cde/programs/dtlogin/Makefile.am | 2 +- cde/programs/dtlogin/dm.h | 4 ---- cde/programs/dtlogin/vg.h | 4 ---- 5 files changed, 4 insertions(+), 24 deletions(-) diff --git a/cde/lib/tt/bin/ttauth/Makefile.am b/cde/lib/tt/bin/ttauth/Makefile.am index f88d43337..d17f8d302 100644 --- a/cde/lib/tt/bin/ttauth/Makefile.am +++ b/cde/lib/tt/bin/ttauth/Makefile.am @@ -2,7 +2,7 @@ MAINTAINERCLEANFILES = Makefile.in bin_PROGRAMS = ttauth -ttauth_CFLAGS = -I../../slib -I../../lib -DSIGNALRETURNSINT +ttauth_CFLAGS = -I../../slib -I../../lib ttauth_LDADD = @LIBTT@ $(X_LIBS) diff --git a/cde/lib/tt/bin/ttauth/process.c b/cde/lib/tt/bin/ttauth/process.c index 99a5b15ce..d776f7f5a 100644 --- a/cde/lib/tt/bin/ttauth/process.c +++ b/cde/lib/tt/bin/ttauth/process.c @@ -478,25 +478,16 @@ static Bool ttauth_allowed = True; /* if allowed to write auth file */ static char *ttauth_filename = NULL; static Bool dieing = False; -#ifdef SIGNALRETURNSINT -#define _signal_t int -#else -#define _signal_t void -#endif - /* ARGSUSED */ -static _signal_t +static void die(int sig) { dieing = True; exit (auth_finalize ()); /* NOTREACHED */ -#ifdef SIGNALRETURNSINT - return -1; /* for picky compilers */ -#endif } -static _signal_t +static void catchsig(int sig) { #ifdef SYSV @@ -505,9 +496,6 @@ catchsig(int sig) if (verbose && ttauth_modified) printf ("\r\n"); die (sig); /* NOTREACHED */ -#ifdef SIGNALRETURNSINT - return -1; /* for picky compilers */ -#endif } static void diff --git a/cde/programs/dtlogin/Makefile.am b/cde/programs/dtlogin/Makefile.am index 804aa3153..ca0f6d487 100644 --- a/cde/programs/dtlogin/Makefile.am +++ b/cde/programs/dtlogin/Makefile.am @@ -39,7 +39,7 @@ libresource_a_CFLAGS = $(AM_CFLAGS) \ -DDEF_SESSION=\"$(CDE_INSTALLATION_TOP)/bin/Xsession\" \ -DDEF_SYSTEM_SHELL=\"/bin/sh\" \ -DDEF_CHOOSER=\"$(CDE_INSTALLATION_TOP)/bin/dtchooser\" \ - -DDEF_XDM_CONFIG=\"Xconfig\" -DSIGNALRETURNSINT \ + -DDEF_XDM_CONFIG=\"Xconfig\" \ -DDEF_SERVER_LINE=\"":0 Local local $(DEF_SERVER) :0"\" \ -DXRDB_PROGRAM=\"$(XRDB)\" \ -DDEF_USER_PATH=\"$(DEF_USER_PATH)\" \ diff --git a/cde/programs/dtlogin/dm.h b/cde/programs/dtlogin/dm.h index 87aa8a1fb..946a8b664 100644 --- a/cde/programs/dtlogin/dm.h +++ b/cde/programs/dtlogin/dm.h @@ -161,11 +161,7 @@ /* Utmp rec prefix */ #define UTMPREC_PREFIX "dt" -#ifdef SIGNALRETURNSINT -#define SIGVAL int -#else #define SIGVAL void -#endif #ifndef UID_NO_CHANGE diff --git a/cde/programs/dtlogin/vg.h b/cde/programs/dtlogin/vg.h index 03d9e3fe6..b079c84ee 100644 --- a/cde/programs/dtlogin/vg.h +++ b/cde/programs/dtlogin/vg.h @@ -70,11 +70,7 @@ extern int errno; # include #endif -#ifdef SIGNALRETURNSINT -#define SIGVAL int -#else #define SIGVAL void -#endif /****************************************************************************