From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C9CFF158042 for ; Sun, 17 Nov 2024 01:39:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F0ABBE0957; Sun, 17 Nov 2024 01:39:08 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D9E73E0957 for ; Sun, 17 Nov 2024 01:39:08 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 18D0833BE1D for ; Sun, 17 Nov 2024 01:39:08 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 76E97156C for ; Sun, 17 Nov 2024 01:39:06 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1731807528.71370c7a650eedcfba1d18678f00e062d6f78971.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/unifdef/files/, dev-util/unifdef/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/unifdef/files/unifdef-2.12-c23.patch dev-util/unifdef/unifdef-2.12-r1.ebuild X-VCS-Directories: dev-util/unifdef/ dev-util/unifdef/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 71370c7a650eedcfba1d18678f00e062d6f78971 X-VCS-Branch: master Date: Sun, 17 Nov 2024 01:39:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 3265770b-2524-4605-9e26-dcd66fac6204 X-Archives-Hash: 76d22a7af076f730f0a96182c559e4b8 commit: 71370c7a650eedcfba1d18678f00e062d6f78971 Author: Sam James gentoo org> AuthorDate: Sun Nov 17 01:38:05 2024 +0000 Commit: Sam James gentoo org> CommitDate: Sun Nov 17 01:38:48 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71370c7a dev-util/unifdef: fix C23 compat Signed-off-by: Sam James gentoo.org> dev-util/unifdef/files/unifdef-2.12-c23.patch | 51 +++++++++++++++++++++++++++ dev-util/unifdef/unifdef-2.12-r1.ebuild | 7 ++-- 2 files changed, 56 insertions(+), 2 deletions(-) diff --git a/dev-util/unifdef/files/unifdef-2.12-c23.patch b/dev-util/unifdef/files/unifdef-2.12-c23.patch new file mode 100644 index 000000000000..f95ecd38e5c0 --- /dev/null +++ b/dev-util/unifdef/files/unifdef-2.12-c23.patch @@ -0,0 +1,51 @@ +https://github.com/fanf2/unifdef/pull/19 + +From d616741e6b0d5b57b66447e85ad32b283b28adde Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Sun, 17 Nov 2024 01:26:27 +0000 +Subject: [PATCH] Don't use C23 constexpr keyword + +This fixes building with upcoming GCC 15 which defaults to -std=gnu23. +--- a/unifdef.c ++++ b/unifdef.c +@@ -202,7 +202,7 @@ static int depth; /* current #if nesting */ + static int delcount; /* count of deleted lines */ + static unsigned blankcount; /* count of blank lines */ + static unsigned blankmax; /* maximum recent blankcount */ +-static bool constexpr; /* constant #if expression */ ++static bool is_constexpr; /* constant #if expression */ + static bool zerosyms; /* to format symdepth output */ + static bool firstsym; /* ditto */ + +@@ -1086,7 +1086,7 @@ eval_unary(const struct ops *ops, long *valp, const char **cpp) + *valp = (value[sym] != NULL); + lt = *valp ? LT_TRUE : LT_FALSE; + } +- constexpr = false; ++ is_constexpr = false; + } else if (!endsym(*cp)) { + debug("eval%d symbol", prec(ops)); + sym = findsym(&cp); +@@ -1103,7 +1103,7 @@ eval_unary(const struct ops *ops, long *valp, const char **cpp) + lt = *valp ? LT_TRUE : LT_FALSE; + cp = skipargs(cp); + } +- constexpr = false; ++ is_constexpr = false; + } else { + debug("eval%d bad expr", prec(ops)); + return (LT_ERROR); +@@ -1170,10 +1170,10 @@ ifeval(const char **cpp) + long val = 0; + + debug("eval %s", *cpp); +- constexpr = killconsts ? false : true; ++ is_constexpr = killconsts ? false : true; + ret = eval_table(eval_ops, &val, cpp); + debug("eval = %d", val); +- return (constexpr ? LT_IF : ret == LT_ERROR ? LT_IF : ret); ++ return (is_constexpr ? LT_IF : ret == LT_ERROR ? LT_IF : ret); + } + + /* + diff --git a/dev-util/unifdef/unifdef-2.12-r1.ebuild b/dev-util/unifdef/unifdef-2.12-r1.ebuild index 732ab1e3c37a..a65c8b893bcc 100644 --- a/dev-util/unifdef/unifdef-2.12-r1.ebuild +++ b/dev-util/unifdef/unifdef-2.12-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -13,7 +13,10 @@ LICENSE="BSD" SLOT="0" KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" -PATCHES=( "${FILESDIR}"/${P}-tests.patch ) +PATCHES=( + "${FILESDIR}"/${P}-tests.patch + "${FILESDIR}"/${P}-c23.patch +) DOCS=( README )