From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 6QxyDDNRzmoCoQIAWB0awg (envelope-from ) for ; Tue, 13 Oct 2026 11:41:39 -0400 Received: by simark.ca (Postfix, from userid 112) id 2978D1E051; Tue, 13 Oct 2026 11:41:39 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id A38551E04E for ; Tue, 13 Oct 2026 11:41:37 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CF17B4BA23FB for ; Tue, 13 Oct 2026 15:41:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CF17B4BA23FB Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id EFA7A4BA2E39 for ; Tue, 13 Oct 2026 15:41:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EFA7A4BA2E39 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org EFA7A4BA2E39 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1791906073; cv=none; b=Pr+mBqxeISy1A7oqjcUJg4J4lh8Ts83Rz7gPY4j2jlV+AeSsGOYnSR+rUyikYe4Tn/L6IGq3s2idLpf4ppk5EVfe3XsNh0iR3qUg2WAUwFW72m9cr+tTYiYJyUeNOUl5LeiCPEbMQZtSWPcxjj09JE+FCkRLRwrBIYqRwoy0guc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1791906073; c=relaxed/simple; bh=Ga/+kdcliLgS82G3LKce2dvdGHkS0L8/Cek8Fx2ztlo=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=AvOYItQ+KClWYd89zjsDi22vkK5uxhiR5i5jfm0UV0sBml3ke/ppjdnbYTWvvjQNYvZR6O0PHlBqtpcYmZImTIpF+fGyKEXQd8s3kJXiMnCv9HSgrP+5tWLGhTFH/xrJUl5E1lowZOuDurja4bI16Kbn9JEyTM0Y9WdL8zVQD4I= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EFA7A4BA2E39 Received: by simark.ca (Postfix) id 22E5C1E04E; Tue, 13 Oct 2026 11:41:12 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 16/16] gdbserver, gdbsupport: don't check for signal.h, fcntl.h and locale.h Date: Tue, 13 Oct 2026 11:36:02 -0400 Message-ID: <20261013153657.1610298-17-simon.marchi@efficios.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261013153657.1610298-1-simon.marchi@efficios.com> References: <20261013153657.1610298-1-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org These headers are already included unconditionally in files built on all hosts: signal.h in gdb/utils.c, fcntl.h in gdb/defs.h and locale.h in gnulib/import/hard-locale.c. This shows that the checks are not necessary. Remove the HAVE_SIGNAL_H, HAVE_FCNTL_H and HAVE_LOCALE_H conditions around their includes, and the corresponding header checks from common.m4 and gdbserver's configure.ac. Regenerate config.in and configure in gdb, gdbserver and gdbsupport. Change-Id: I0b2953f3c9d2a13dc9cec37c683986b36edbecf4 --- gdb/config.in | 6 ------ gdb/configure | 2 -- gdbserver/config.in | 9 --------- gdbserver/configure | 4 ---- gdbserver/configure.ac | 2 -- gdbserver/fork-child.cc | 2 -- gdbserver/gdbreplay.cc | 2 -- gdbserver/remote-utils.cc | 4 ---- gdbserver/server.cc | 2 -- gdbsupport/common.m4 | 2 -- gdbsupport/config.in | 6 ------ gdbsupport/configure | 2 -- gdbsupport/gdb_locale.h | 4 +--- gdbsupport/signals.cc | 2 -- 14 files changed, 1 insertion(+), 48 deletions(-) diff --git a/gdb/config.in b/gdb/config.in index 9cfa1026d08f..7ea0e9cfce8e 100644 --- a/gdb/config.in +++ b/gdb/config.in @@ -303,9 +303,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_PERF_EVENT_H -/* Define to 1 if you have the header file. */ -#undef HAVE_LOCALE_H - /* Define to 1 if the system has the type `long long'. */ #undef HAVE_LONG_LONG @@ -429,9 +426,6 @@ /* Define to 1 if you have the `sigaltstack' function. */ #undef HAVE_SIGALTSTACK -/* Define to 1 if you have the header file. */ -#undef HAVE_SIGNAL_H - /* Define to 1 if you have the `sigprocmask' function. */ #undef HAVE_SIGPROCMASK diff --git a/gdb/configure b/gdb/configure index cfe994c3842a..b6222402d6c0 100755 --- a/gdb/configure +++ b/gdb/configure @@ -19837,10 +19837,8 @@ for ac_header in \ dlfcn.h \ linux/elf.h \ linux/perf_event.h \ - locale.h \ poll.h \ proc_service.h \ - signal.h \ sys/poll.h \ sys/resource.h \ sys/select.h \ diff --git a/gdbserver/config.in b/gdbserver/config.in index 7aae2f7398b5..cf6ebe0a4f26 100644 --- a/gdbserver/config.in +++ b/gdbserver/config.in @@ -105,9 +105,6 @@ /* Define if has elf_fpregset_t. */ #undef HAVE_ELF_FPREGSET_T -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - /* Define to 1 if you have the `fdwalk' function. */ #undef HAVE_FDWALK @@ -165,9 +162,6 @@ /* Define if the target supports PTRACE_PEEKUSR for register access. */ #undef HAVE_LINUX_USRREGS -/* Define to 1 if you have the header file. */ -#undef HAVE_LOCALE_H - /* Define to 1 if the system has the type `long long'. */ #undef HAVE_LONG_LONG @@ -253,9 +247,6 @@ /* Define to 1 if you have the `sigaltstack' function. */ #undef HAVE_SIGALTSTACK -/* Define to 1 if you have the header file. */ -#undef HAVE_SIGNAL_H - /* Define to 1 if you have the `sigprocmask' function. */ #undef HAVE_SIGPROCMASK diff --git a/gdbserver/configure b/gdbserver/configure index 9555b15bd725..f838f0881201 100755 --- a/gdbserver/configure +++ b/gdbserver/configure @@ -8041,10 +8041,8 @@ for ac_header in \ dlfcn.h \ linux/elf.h \ linux/perf_event.h \ - locale.h \ poll.h \ proc_service.h \ - signal.h \ sys/poll.h \ sys/resource.h \ sys/select.h \ @@ -12546,11 +12544,9 @@ fi for ac_header in \ arpa/inet.h \ - fcntl.h \ netdb.h \ netinet/in.h \ netinet/tcp.h \ - signal.h \ sys/file.h \ sys/ioctl.h \ sys/procfs.h \ diff --git a/gdbserver/configure.ac b/gdbserver/configure.ac index 2ae3e1c6e494..16a2520baf42 100644 --- a/gdbserver/configure.ac +++ b/gdbserver/configure.ac @@ -67,11 +67,9 @@ ZW_GNU_GETTEXT_SISTER_DIR AC_CHECK_HEADERS([ \ arpa/inet.h \ - fcntl.h \ netdb.h \ netinet/in.h \ netinet/tcp.h \ - signal.h \ sys/file.h \ sys/ioctl.h \ sys/procfs.h \ diff --git a/gdbserver/fork-child.cc b/gdbserver/fork-child.cc index 7f57ea424375..055f772ec822 100644 --- a/gdbserver/fork-child.cc +++ b/gdbserver/fork-child.cc @@ -19,9 +19,7 @@ #include "gdbsupport/job-control.h" #include "gdbsupport/scoped_restore.h" #include "nat/fork-inferior.h" -#ifdef HAVE_SIGNAL_H #include -#endif #ifdef SIGTTOU /* A file descriptor for the controlling terminal. */ diff --git a/gdbserver/gdbreplay.cc b/gdbserver/gdbreplay.cc index f4626ceadb82..3a09a4d0f0c5 100644 --- a/gdbserver/gdbreplay.cc +++ b/gdbserver/gdbreplay.cc @@ -29,9 +29,7 @@ #if HAVE_SYS_FILE_H #include #endif -#if HAVE_SIGNAL_H #include -#endif #include #ifdef HAVE_NETINET_IN_H #include diff --git a/gdbserver/remote-utils.cc b/gdbserver/remote-utils.cc index ff71eb674829..8192e4577f2e 100644 --- a/gdbserver/remote-utils.cc +++ b/gdbserver/remote-utils.cc @@ -51,12 +51,8 @@ #if HAVE_SYS_IOCTL_H #include #endif -#if HAVE_SIGNAL_H #include -#endif -#if HAVE_FCNTL_H #include -#endif #include "gdbsupport/gdb_sys_time.h" #include #if HAVE_ARPA_INET_H diff --git a/gdbserver/server.cc b/gdbserver/server.cc index a208e24d09f6..74774fcde7ca 100644 --- a/gdbserver/server.cc +++ b/gdbserver/server.cc @@ -23,9 +23,7 @@ #include "gdbsupport/rsp-low.h" #include "gdbsupport/signals-state-save-restore.h" #include -#if HAVE_SIGNAL_H #include -#endif #include "gdbsupport/gdb_vecs.h" #include "gdbsupport/gdb_wait.h" #include "gdbsupport/btrace-common.h" diff --git a/gdbsupport/common.m4 b/gdbsupport/common.m4 index 2f4b67127434..bf21c31d78d7 100644 --- a/gdbsupport/common.m4 +++ b/gdbsupport/common.m4 @@ -43,10 +43,8 @@ AC_CHECK_HEADERS([ \ dlfcn.h \ linux/elf.h \ linux/perf_event.h \ - locale.h \ poll.h \ proc_service.h \ - signal.h \ sys/poll.h \ sys/resource.h \ sys/select.h \ diff --git a/gdbsupport/config.in b/gdbsupport/config.in index f99a88352196..ff84ab0d6007 100644 --- a/gdbsupport/config.in +++ b/gdbsupport/config.in @@ -141,9 +141,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_PERF_EVENT_H -/* Define to 1 if you have the header file. */ -#undef HAVE_LOCALE_H - /* Define to 1 if the system has the type `long long'. */ #undef HAVE_LONG_LONG @@ -204,9 +201,6 @@ /* Define to 1 if you have the `sigaltstack' function. */ #undef HAVE_SIGALTSTACK -/* Define to 1 if you have the header file. */ -#undef HAVE_SIGNAL_H - /* Define to 1 if you have the `sigprocmask' function. */ #undef HAVE_SIGPROCMASK diff --git a/gdbsupport/configure b/gdbsupport/configure index 5df02c4676fd..74861f27bfdc 100755 --- a/gdbsupport/configure +++ b/gdbsupport/configure @@ -10940,10 +10940,8 @@ for ac_header in \ dlfcn.h \ linux/elf.h \ linux/perf_event.h \ - locale.h \ poll.h \ proc_service.h \ - signal.h \ sys/poll.h \ sys/resource.h \ sys/select.h \ diff --git a/gdbsupport/gdb_locale.h b/gdbsupport/gdb_locale.h index f5f0f5622770..784552e670fc 100644 --- a/gdbsupport/gdb_locale.h +++ b/gdbsupport/gdb_locale.h @@ -19,9 +19,7 @@ #ifndef GDBSUPPORT_GDB_LOCALE_H #define GDBSUPPORT_GDB_LOCALE_H -#ifdef HAVE_LOCALE_H -# include -#endif +#include #ifdef ENABLE_NLS # include diff --git a/gdbsupport/signals.cc b/gdbsupport/signals.cc index 367ca571f3db..6f871c28c9e3 100644 --- a/gdbsupport/signals.cc +++ b/gdbsupport/signals.cc @@ -18,9 +18,7 @@ along with this program. If not, see . */ -#ifdef HAVE_SIGNAL_H #include -#endif #include "gdb_signals.h" -- 2.56.0