From 7390e47db115ba7f7c91732d779b2318d03a19d2 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli <5175948+kinkie@users.noreply.github.com> Date: Thu, 13 Mar 2025 23:08:32 +0000 Subject: [PATCH] Maintenance: remove compat/psignal (#2022) psignal(3) is not used anywhere in squid. Remove the also-unused bundled implementation --- compat/Makefile.am | 1 - compat/psignal.c | 30 ------------------------------ compat/psignal.h | 19 ------------------- configure.ac | 1 - 4 files changed, 51 deletions(-) delete mode 100644 compat/psignal.c delete mode 100644 compat/psignal.h diff --git a/compat/Makefile.am b/compat/Makefile.am index 028e817d53..eeb856709a 100644 --- a/compat/Makefile.am +++ b/compat/Makefile.am @@ -62,7 +62,6 @@ libcompatsquid_la_SOURCES = \ os/solaris.h \ os/sunos.h \ osdetect.h \ - psignal.h \ shm.cc \ shm.h \ statvfs.cc \ diff --git a/compat/psignal.c b/compat/psignal.c deleted file mode 100644 index 0963906d5b..0000000000 --- a/compat/psignal.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 1996-2023 The Squid Software Foundation and contributors - * - * Squid software is distributed under GPLv2+ license and includes - * contributions from numerous individuals and organizations. - * Please see the COPYING and CONTRIBUTORS files for details. - */ - -#include "squid.h" -#include "psignal.h" - -#if _SQUID_AIX_ || _SQUID_ANDROID_ || _SQUID_MINGW_ -extern const char* const sys_siglist[]; -#define _sys_nsig 64 -#define _sys_siglist sys_siglist -#endif - -/// purpose: print message, colon, space, signal name and LF. -/// paramtr: sig (IN): signal number -/// msg (IN): message to prepend -void -psignal( int sig, const char* msg ) -{ - if ( msg && *msg ) fprintf( stderr, "%s: ", msg ); - if ( sig > 0 && sig < _sys_nsig ) - fprintf( stderr, "%s\n", _sys_siglist[sig] ); - else - fputs( "(unknown)\n", stderr ); -} - diff --git a/compat/psignal.h b/compat/psignal.h deleted file mode 100644 index 2976f4cca0..0000000000 --- a/compat/psignal.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 1996-2023 The Squid Software Foundation and contributors - * - * Squid software is distributed under GPLv2+ license and includes - * contributions from numerous individuals and organizations. - * Please see the COPYING and CONTRIBUTORS files for details. - */ - -#ifndef SQUID_COMPAT_PSIGNAL_H -#define SQUID_COMPAT_PSIGNAL_H - -#if HAVE_SIGNAL_H -#include -#endif - -extern void psignal(int sig, const char* msg); - -#endif /* SQUID_COMPAT_PSIGNAL_H */ - diff --git a/configure.ac b/configure.ac index c63f92f3e9..cfba1e2a00 100644 --- a/configure.ac +++ b/configure.ac @@ -2178,7 +2178,6 @@ AC_CHECK_FUNCS(\ dnl ... and some we provide local replacements for AC_REPLACE_FUNCS(\ initgroups \ - psignal \ strerror \ strtoll \ tempnam \ -- 2.47.3