From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id inVHKdiPy2rl/zEAWB0awg (envelope-from ) for ; Sun, 11 Oct 2026 09:32:08 -0400 Received: by simark.ca (Postfix, from userid 112) id 728DA1E04E; Sun, 11 Oct 2026 09:32:08 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::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 63EAB1E04E for ; Sun, 11 Oct 2026 09:32:06 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 18CA24BA23D1 for ; Sun, 11 Oct 2026 13:32:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 18CA24BA23D1 Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 738544BA2E36 for ; Sun, 11 Oct 2026 13:31:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 738544BA2E36 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 738544BA2E36 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=1791725500; cv=none; b=EE8Naj33XqVNH6MLjQfXrKSvnGKERCzDvBFr/g2dMjibJIkyQAsaRg8o4UQNDlPaAjOfhnVH5S7kKE/IQ5J7oFScVsXHIY7wQW38QEtQ8WQmiCyIFlqb70+ErxLfwnrWQFhQE6cltphEuYxVneBDc3sB6LvdEDQac8gUfgmeHQs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1791725500; c=relaxed/simple; bh=4lO5A4xmYxf5gRXh+RvpZSGP2DjBdd+I6zDT6sadxYo=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=OYO7VxQIbaELzdWTyE8TDJ6/fRGoGtyaXxt5/C1CfAyFXedyszUU3VyPYocgPD3FhVIyzp1kGM1FB6V+j2ixmTLmx/6ZD2CQhpmMrTN+2wU8QzmVZMYivH4OGdTtmV48XqmSPfpgzSsDG94zNdj846cjPwwEpRNvoFookAgOT1I= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 738544BA2E36 Received: by simark.ca (Postfix) id 1540C1E050; Sun, 11 Oct 2026 09:31:38 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 2/2] gdb: remove workarounds for old expat versions Date: Sun, 11 Oct 2026 09:31:14 -0400 Message-ID: <20261011133136.472634-2-simon.marchi@efficios.com> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261011133136.472634-1-simon.marchi@efficios.com> References: <20261011133136.472634-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 gdb_expat.h provides fallback definitions of XML_STATUS_OK, XML_STATUS_ERROR and XMLCALL for versions that lack them. xml-support.c only calls XML_StopParser if configure found it. These workarounds were relevant for the Expat 1.95.x versions, which is not relevant anymore (Expat 2 was released 20 years ago). Remove AC_CHECK_FUNCS(XML_StopParser) and the conditional in xml-support.c. Remove the fallback definitions from gdb_expat.h. Change-Id: Ia0d0dd692518c190dfb97644be3bb2f3b4082b05 --- gdb/config.in | 3 --- gdb/configure | 15 --------------- gdb/configure.ac | 5 ----- gdb/gdb_expat.h | 13 ------------- gdb/xml-support.c | 2 -- 5 files changed, 38 deletions(-) diff --git a/gdb/config.in b/gdb/config.in index 0e5a6637c2b1..8afa32f83e7f 100644 --- a/gdb/config.in +++ b/gdb/config.in @@ -628,9 +628,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_WS2TCPIP_H -/* Define to 1 if you have the `XML_StopParser' function. */ -#undef HAVE_XML_STOPPARSER - /* Define to 1 if zstd is enabled. */ #undef HAVE_ZSTD diff --git a/gdb/configure b/gdb/configure index 810e9ed7a378..9487c2c55001 100755 --- a/gdb/configure +++ b/gdb/configure @@ -28249,21 +28249,6 @@ $as_echo "$LIBEXPAT" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} fi - else - save_LIBS=$LIBS - LIBS="$LIBS $LIBEXPAT" - for ac_func in XML_StopParser -do : - ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" -if test "x$ac_cv_func_XML_StopParser" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_XML_STOPPARSER 1 -_ACEOF - -fi -done - - LIBS=$save_LIBS fi fi diff --git a/gdb/configure.ac b/gdb/configure.ac index 0d88a280b163..b1f19cb80ee0 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -796,11 +796,6 @@ else else AC_MSG_WARN([expat is missing or unusable; some features may be unavailable.]) fi - else - save_LIBS=$LIBS - LIBS="$LIBS $LIBEXPAT" - AC_CHECK_FUNCS(XML_StopParser) - LIBS=$save_LIBS fi fi diff --git a/gdb/gdb_expat.h b/gdb/gdb_expat.h index 756cf81be95c..4b9ed1ac1381 100644 --- a/gdb/gdb_expat.h +++ b/gdb/gdb_expat.h @@ -22,19 +22,6 @@ #include -/* Expat 1.95.x does not define these; this is the definition - recommended by the expat 2.0 headers. */ -#ifndef XML_STATUS_OK -# define XML_STATUS_OK 1 -# define XML_STATUS_ERROR 0 -#endif - -/* Old versions of expat do not define this macro, so define it - as void. */ -#ifndef XMLCALL -#define XMLCALL -#endif - /* Return the line number of PARSER's current position. Expat 2.9.0 deprecates XML_GetCurrentLineNumber in favor of diff --git a/gdb/xml-support.c b/gdb/xml-support.c index 7d86dbb8c698..0e33ce54d12e 100644 --- a/gdb/xml-support.c +++ b/gdb/xml-support.c @@ -117,9 +117,7 @@ struct gdb_xml_parser void set_error (gdb_exception &&error) { m_error = std::move (error); -#ifdef HAVE_XML_STOPPARSER XML_StopParser (m_expat_parser, XML_FALSE); -#endif } /* Return the underlying expat parser. */ -- 2.56.0