From patchwork Mon Nov 10 14:17:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 123963 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 469B73858D2A for ; Mon, 10 Nov 2025 14:19:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 469B73858D2A Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=OIC1v/bW X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by sourceware.org (Postfix) with ESMTPS id 09EEA3858D3C for ; Mon, 10 Nov 2025 14:17:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 09EEA3858D3C Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 09EEA3858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=172.234.252.31 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762784249; cv=none; b=noVzhoLEsD2yTiZGu9NZsxZAzTiGMRulGQ3ncbqkJplCe1KNsX3A9LvZlv6x3+KxZCIQ4VWDB5vJy6ODriFDwg3BTSv/2ypfpp+VdRKPEJVs2s0JYQ06qWnNI+mZM3NtojBXDFrkRW35pE9gEUDupZEPZUChIVpRhETbA5dJtpo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762784249; c=relaxed/simple; bh=RSnzw1CPbbTcNX1GMd94xidZbLoHHtSpcM/D8zdnnRc=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=V6aBPRlWVTcLilNrXx3Njk1hDyfzEbjlzHB5WZck0jgaeyiL7XwBQcG9HTONfrXQ+63PfdfInxrS6MRKDr1tC8iaXX3vwtiJSqy0hVnJ+BAtCrCHhBEbZpV/mGKoMb9xtE4OQ76V1vGbN/5jQ11ukczXprOWSjJ0olO8TpS7GNQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 09EEA3858D3C Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 5ABE944381; Mon, 10 Nov 2025 14:17:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2573C4CEFB; Mon, 10 Nov 2025 14:17:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1762784248; bh=RSnzw1CPbbTcNX1GMd94xidZbLoHHtSpcM/D8zdnnRc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OIC1v/bW/GayFRRAyYzHxBhonJ4kE1nmPWK3V9Kmz2A9JsEIifI5FkIkWTet6aI5S kwAsRhCXX9Bpok0KTwm/q6QUXXzttSmdhW4jn5mI7zR8/mzlyKVjBHV41qWLzibc9m 4qmv8rFAETVH4Rw2Wvnu0XxGgyZKUkiEqzKBOu/35ZaMJWL7NTXwFU7wrgeks6//Xc zcnrJJZ6pyZsStBjZfepBI3iBsbIi0yyaF569Emxhbwr+jwOeLS/0e0ONzQe060QYd A4T1eIMupNKkOdwZZuvsLdI/7sJh9iuhON7PqagZWVwgKv/0qs+YAlqZfLSUZjFxKq NpRIjs7czR1MQ== Date: Mon, 10 Nov 2025 15:17:24 +0100 From: Alejandro Colomar To: libc-alpha@sourceware.org Cc: Paul Eggert , Florian Weimer , Alejandro Colomar , "H.J. Lu" , Collin Funk , Bruno Haible Subject: [PATCH v3 1/7] Assume support for #warning Message-ID: X-Mailer: git-send-email 2.51.0 References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org This was supported by GCC 1.x, and is now standard since ISO C23. Signed-off-by: Alejandro Colomar --- argp/argp-help.c | 4 +--- math/math.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/argp/argp-help.c b/argp/argp-help.c index 3fe3a244ce..2200aaf617 100644 --- a/argp/argp-help.c +++ b/argp/argp-help.c @@ -1825,9 +1825,7 @@ __argp_short_program_name (void) /* FIXME: What now? Miles suggests that it is better to use NULL, but currently the value is passed on directly to fputs_unlocked, so that requires more changes. */ -# if __GNUC__ -# warning No reasonable value to return -# endif /* __GNUC__ */ +# warning No reasonable value to return return ""; # endif } diff --git a/math/math.h b/math/math.h index b0d99cff8e..b2799f98a6 100644 --- a/math/math.h +++ b/math/math.h @@ -26,7 +26,7 @@ #define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION #include -#if defined log && defined __GNUC__ +#if defined log # warning A macro called log was already defined when was included. # warning This will cause compilation problems. #endif From patchwork Mon Nov 10 14:17:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 123964 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 149CF3858413 for ; Mon, 10 Nov 2025 14:21:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 149CF3858413 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=kBHchAeg X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sea.source.kernel.org (sea.source.kernel.org [IPv6:2600:3c0a:e001:78e:0:1991:8:25]) by sourceware.org (Postfix) with ESMTPS id A2C893858C53 for ; Mon, 10 Nov 2025 14:17:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A2C893858C53 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A2C893858C53 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2600:3c0a:e001:78e:0:1991:8:25 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762784252; cv=none; b=UEc0Y1/NYNt/8OH98J7bebE0Na4LFU6oZmmrhz7mCuuDd33WlnFbfAS7ALFN+FXK9TPQgFSHDKJrUrXayJnWUdTZfB6N/4/W9TmY2cUJ3WFVpRm+E+vY2dc91X7cXM9ZVPsiwWFyYFJ08acFSFd3Ab6hH88IvHl5kFTkqWBqSAA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762784252; c=relaxed/simple; bh=mBRCPaDUq1LMh8WiHBQVBSUxQ5rGVv1v5/0buCF2yoY=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=BZfoTXauZ3wWqvBI8DVpsFd0KI3j8AeH8miyapHYBbPAAgDa+ZRIbPKMIWXhilYyHdkEbgjFCbbKn6ZnpGilek4Y9uQU+WfmmbUe2rvTseYCxYcsYknP7FjE5CQD61/t2RBIl+6N8hBh4RX1Rj+CsTmAiXs42ug+7X11leCVktU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A2C893858C53 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 063AC442DE; Mon, 10 Nov 2025 14:17:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E561C19422; Mon, 10 Nov 2025 14:17:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1762784251; bh=mBRCPaDUq1LMh8WiHBQVBSUxQ5rGVv1v5/0buCF2yoY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kBHchAegA/BfGy4Vi7AOxOV2lceTS82jJam6u394vIUDfhj7HezCZCDEGWGpLH5d+ gBwm5atLHdl7mDLb5cVyAixr8Hrp37L5MWZbmhLcbpR7qEzsLVAqYaYs4G3z0xaRa0 4erdTRV9e4tBxSe1VZ42Cl4eMcr3FItaC+5XwK3DAL+2wWoV1vEBztgoT3DN51sbT/ qq8shZbGfvuwUFTvAK2t6aMMAC9lrCCCAAmWJd930w8NnBDd95WNeRubT1smLB4wHt 9F5SVY154JXXjO5qJij2qFA5vHZrGgELUGMVyZiRMQAoBh7dK8MxFR5SdAi7TPK64j rA6cs2KH6/2Uw== Date: Mon, 10 Nov 2025 15:17:28 +0100 From: Alejandro Colomar To: libc-alpha@sourceware.org Cc: Paul Eggert , Florian Weimer , Alejandro Colomar , "H.J. Lu" , Collin Funk , Bruno Haible Subject: [PATCH v3 2/7] malloc/obstack.h: Assume GCC supports __extension__ Message-ID: X-Mailer: git-send-email 2.51.0 References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org GCC supports __extension__ since at least GCC 2.8. Signed-off-by: Alejandro Colomar --- malloc/obstack.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/malloc/obstack.h b/malloc/obstack.h index 7e3dee21c8..1c74d85c9b 100644 --- a/malloc/obstack.h +++ b/malloc/obstack.h @@ -258,10 +258,6 @@ extern int obstack_exit_failure; #define obstack_memory_used(h) _obstack_memory_used (h) #if defined __GNUC__ -# if ! (2 < __GNUC__ + (8 <= __GNUC_MINOR__)) -# define __extension__ -# endif - /* For GNU C, if not -traditional, we can define these macros to compute all args only once without using a global variable. From patchwork Mon Nov 10 14:17:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 123968 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D03F13858C51 for ; Mon, 10 Nov 2025 14:27:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D03F13858C51 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=i+lgRkDu X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by sourceware.org (Postfix) with ESMTPS id 5DF0B3858D1E for ; Mon, 10 Nov 2025 14:17:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5DF0B3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5DF0B3858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762784256; cv=none; b=TdH7Y6IayVtXsRpZCHaGc+W6l4ywwiaPH2ikd6W2Sthn2kATNaL6FQzp0/MCxNsvOlVy0gt7Sn+AZb/xLV058Ekr4g7KO82nmSf+E2huWr+PTZuX71UhK/71t2sqf2AACXckpC33Ur+KhWruvEF2jrrCKDjUst5ktw8ycGPU+d8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762784256; c=relaxed/simple; bh=jYpdpN71wU3RX4C8iXQfm8UoMh+MGdHSHdAE8M1CNMI=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=pel/YZhvilkGGtuvdcFEpe6XUFmLaDh+KCdb9Vt28/ejvtKJxLJlGKozZ9760aCxDtSzW2l4VxHPyi6l+t0Z9Yviyg3/2DCX9CJeBvtAx7of4wH/83ETKuMfHSlkuaiIJWEsHlyFQtcGykLc+NRZ4D5LH2XJYIeMwdp23rmqlFE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5DF0B3858D1E Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id AF5BC601A5; Mon, 10 Nov 2025 14:17:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5B0BC19424; Mon, 10 Nov 2025 14:17:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1762784255; bh=jYpdpN71wU3RX4C8iXQfm8UoMh+MGdHSHdAE8M1CNMI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=i+lgRkDuqBzQHm8DuWrQiY7avugUA7y4fabJtQeu1qaJUgVZz1Cb6cKJ6we8orqAO VesdRvzB02/2quipjc9xX5N6Q2gL3qmVYpmrN6akjb+8p0wfSgHa83FTrDPIdKnYOR VVeJVrJ32Iknp7XKqAgR+Hk1ailErIU7dXNjx96YPlkhbVwRpi+fZBGUci4PYIwCiN E6md2+R3GU1wgqtunfuLPYg5nikA8rSPFqzq0lMH+v/HQlRphNa6wJ1/Zt74TfIJpz Dcd47G4to1dkfJkrobTTQx4TQxJ/x8k2dPNMEy2lnWl7KZ56Y1aqcULqNbQORu/8W3 Rnvf/yS5J6LsA== Date: Mon, 10 Nov 2025 15:17:32 +0100 From: Alejandro Colomar To: libc-alpha@sourceware.org Cc: Paul Eggert , Florian Weimer , Alejandro Colomar , "H.J. Lu" , Collin Funk , Bruno Haible Subject: [PATCH v3 3/7] Assume support for __extension__ ({ }) Message-ID: <808bc3feff6085c4fb06c62a0445feb23e8fd15b.1762784073.git.alx@kernel.org> X-Mailer: git-send-email 2.51.0 References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org /* Oh come on. Get a reasonable compiler. */ GCC supports __extension__ since at least GCC 2.8. GCC supports ({ }) since GCC 1.x. Signed-off-by: Alejandro Colomar --- assert/assert.h | 2 +- inet/netinet/in.h | 53 +++--------------- malloc/obstack.h | 140 ++++++---------------------------------------- stdlib/setenv.c | 3 +- time/strptime_l.c | 8 +-- 5 files changed, 27 insertions(+), 179 deletions(-) diff --git a/assert/assert.h b/assert/assert.h index 31892aebcb..273bf7f35c 100644 --- a/assert/assert.h +++ b/assert/assert.h @@ -101,7 +101,7 @@ __END_DECLS ? void (0) \ : __assert_fail (#expr, __ASSERT_FILE, __ASSERT_LINE, \ __ASSERT_FUNCTION)) -# elif !defined __GNUC__ || defined __STRICT_ANSI__ +# elif defined __STRICT_ANSI__ # define assert(expr) \ ((expr) \ ? __ASSERT_VOID_CAST (0) \ diff --git a/inet/netinet/in.h b/inet/netinet/in.h index fa796be406..28b93dd941 100644 --- a/inet/netinet/in.h +++ b/inet/netinet/in.h @@ -433,8 +433,7 @@ extern uint16_t htons (uint16_t __hostshort) # endif #endif -#ifdef __GNUC__ -# define IN6_IS_ADDR_UNSPECIFIED(a) \ +#define IN6_IS_ADDR_UNSPECIFIED(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ __a->__in6_u.__u6_addr32[0] == 0 \ @@ -442,7 +441,7 @@ extern uint16_t htons (uint16_t __hostshort) && __a->__in6_u.__u6_addr32[2] == 0 \ && __a->__in6_u.__u6_addr32[3] == 0; })) -# define IN6_IS_ADDR_LOOPBACK(a) \ +#define IN6_IS_ADDR_LOOPBACK(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ __a->__in6_u.__u6_addr32[0] == 0 \ @@ -450,24 +449,24 @@ extern uint16_t htons (uint16_t __hostshort) && __a->__in6_u.__u6_addr32[2] == 0 \ && __a->__in6_u.__u6_addr32[3] == htonl (1); })) -# define IN6_IS_ADDR_LINKLOCAL(a) \ +#define IN6_IS_ADDR_LINKLOCAL(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ (__a->__in6_u.__u6_addr32[0] & htonl (0xffc00000)) == htonl (0xfe800000); })) -# define IN6_IS_ADDR_SITELOCAL(a) \ +#define IN6_IS_ADDR_SITELOCAL(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ (__a->__in6_u.__u6_addr32[0] & htonl (0xffc00000)) == htonl (0xfec00000); })) -# define IN6_IS_ADDR_V4MAPPED(a) \ +#define IN6_IS_ADDR_V4MAPPED(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ __a->__in6_u.__u6_addr32[0] == 0 \ && __a->__in6_u.__u6_addr32[1] == 0 \ && __a->__in6_u.__u6_addr32[2] == htonl (0xffff); })) -# define IN6_IS_ADDR_V4COMPAT(a) \ +#define IN6_IS_ADDR_V4COMPAT(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ __a->__in6_u.__u6_addr32[0] == 0 \ @@ -475,7 +474,7 @@ extern uint16_t htons (uint16_t __hostshort) && __a->__in6_u.__u6_addr32[2] == 0 \ && ntohl (__a->__in6_u.__u6_addr32[3]) > 1; })) -# define IN6_ARE_ADDR_EQUAL(a,b) \ +#define IN6_ARE_ADDR_EQUAL(a,b) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ const struct in6_addr *__b = (const struct in6_addr *) (b); \ @@ -483,44 +482,6 @@ extern uint16_t htons (uint16_t __hostshort) && __a->__in6_u.__u6_addr32[1] == __b->__in6_u.__u6_addr32[1] \ && __a->__in6_u.__u6_addr32[2] == __b->__in6_u.__u6_addr32[2] \ && __a->__in6_u.__u6_addr32[3] == __b->__in6_u.__u6_addr32[3]; })) -#else -# define IN6_IS_ADDR_UNSPECIFIED(a) \ - (((const uint32_t *) (a))[0] == 0 \ - && ((const uint32_t *) (a))[1] == 0 \ - && ((const uint32_t *) (a))[2] == 0 \ - && ((const uint32_t *) (a))[3] == 0) - -# define IN6_IS_ADDR_LOOPBACK(a) \ - (((const uint32_t *) (a))[0] == 0 \ - && ((const uint32_t *) (a))[1] == 0 \ - && ((const uint32_t *) (a))[2] == 0 \ - && ((const uint32_t *) (a))[3] == htonl (1)) - -# define IN6_IS_ADDR_LINKLOCAL(a) \ - ((((const uint32_t *) (a))[0] & htonl (0xffc00000)) \ - == htonl (0xfe800000)) - -# define IN6_IS_ADDR_SITELOCAL(a) \ - ((((const uint32_t *) (a))[0] & htonl (0xffc00000)) \ - == htonl (0xfec00000)) - -# define IN6_IS_ADDR_V4MAPPED(a) \ - ((((const uint32_t *) (a))[0] == 0) \ - && (((const uint32_t *) (a))[1] == 0) \ - && (((const uint32_t *) (a))[2] == htonl (0xffff))) - -# define IN6_IS_ADDR_V4COMPAT(a) \ - ((((const uint32_t *) (a))[0] == 0) \ - && (((const uint32_t *) (a))[1] == 0) \ - && (((const uint32_t *) (a))[2] == 0) \ - && (ntohl (((const uint32_t *) (a))[3]) > 1)) - -# define IN6_ARE_ADDR_EQUAL(a,b) \ - ((((const uint32_t *) (a))[0] == ((const uint32_t *) (b))[0]) \ - && (((const uint32_t *) (a))[1] == ((const uint32_t *) (b))[1]) \ - && (((const uint32_t *) (a))[2] == ((const uint32_t *) (b))[2]) \ - && (((const uint32_t *) (a))[3] == ((const uint32_t *) (b))[3])) -#endif #define IN6_IS_ADDR_MULTICAST(a) (((const uint8_t *) (a))[0] == 0xff) diff --git a/malloc/obstack.h b/malloc/obstack.h index 1c74d85c9b..3e43a9a735 100644 --- a/malloc/obstack.h +++ b/malloc/obstack.h @@ -257,23 +257,17 @@ extern int obstack_exit_failure; #define obstack_memory_used(h) _obstack_memory_used (h) -#if defined __GNUC__ -/* For GNU C, if not -traditional, - we can define these macros to compute all args only once - without using a global variable. - Also, we can avoid using the 'temp' slot, to make faster code. */ - -# define obstack_object_size(OBSTACK) \ +#define obstack_object_size(OBSTACK) \ __extension__ \ ({ struct obstack const *__o = (OBSTACK); \ (unsigned) (__o->next_free - __o->object_base); }) -# define obstack_room(OBSTACK) \ +#define obstack_room(OBSTACK) \ __extension__ \ ({ struct obstack const *__o = (OBSTACK); \ (unsigned) (__o->chunk_limit - __o->next_free); }) -# define obstack_make_room(OBSTACK, length) \ +#define obstack_make_room(OBSTACK, length) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ int __len = (length); \ @@ -281,7 +275,7 @@ extern int obstack_exit_failure; _obstack_newchunk (__o, __len); \ (void) 0; }) -# define obstack_empty_p(OBSTACK) \ +#define obstack_empty_p(OBSTACK) \ __extension__ \ ({ struct obstack const *__o = (OBSTACK); \ (__o->chunk->prev == 0 \ @@ -289,7 +283,7 @@ extern int obstack_exit_failure; __o->chunk->contents, \ __o->alignment_mask)); }) -# define obstack_grow(OBSTACK, where, length) \ +#define obstack_grow(OBSTACK, where, length) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ int __len = (length); \ @@ -299,7 +293,7 @@ extern int obstack_exit_failure; __o->next_free += __len; \ (void) 0; }) -# define obstack_grow0(OBSTACK, where, length) \ +#define obstack_grow0(OBSTACK, where, length) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ int __len = (length); \ @@ -310,7 +304,7 @@ extern int obstack_exit_failure; *(__o->next_free)++ = 0; \ (void) 0; }) -# define obstack_1grow(OBSTACK, datum) \ +#define obstack_1grow(OBSTACK, datum) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ if (__o->next_free + 1 > __o->chunk_limit) \ @@ -322,21 +316,21 @@ extern int obstack_exit_failure; or ints, and that the data added so far to the current object shares that much alignment. */ -# define obstack_ptr_grow(OBSTACK, datum) \ +#define obstack_ptr_grow(OBSTACK, datum) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ if (__o->next_free + sizeof (void *) > __o->chunk_limit) \ _obstack_newchunk (__o, sizeof (void *)); \ obstack_ptr_grow_fast (__o, datum); }) \ -# define obstack_int_grow(OBSTACK, datum) \ +#define obstack_int_grow(OBSTACK, datum) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ if (__o->next_free + sizeof (int) > __o->chunk_limit) \ _obstack_newchunk (__o, sizeof (int)); \ obstack_int_grow_fast (__o, datum); }) -# define obstack_ptr_grow_fast(OBSTACK, aptr) \ +#define obstack_ptr_grow_fast(OBSTACK, aptr) \ __extension__ \ ({ struct obstack *__o1 = (OBSTACK); \ void *__p1 = __o1->next_free; \ @@ -344,7 +338,7 @@ extern int obstack_exit_failure; __o1->next_free += sizeof (const void *); \ (void) 0; }) -# define obstack_int_grow_fast(OBSTACK, aint) \ +#define obstack_int_grow_fast(OBSTACK, aint) \ __extension__ \ ({ struct obstack *__o1 = (OBSTACK); \ void *__p1 = __o1->next_free; \ @@ -352,7 +346,7 @@ extern int obstack_exit_failure; __o1->next_free += sizeof (int); \ (void) 0; }) -# define obstack_blank(OBSTACK, length) \ +#define obstack_blank(OBSTACK, length) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ int __len = (length); \ @@ -361,19 +355,19 @@ extern int obstack_exit_failure; obstack_blank_fast (__o, __len); \ (void) 0; }) -# define obstack_alloc(OBSTACK, length) \ +#define obstack_alloc(OBSTACK, length) \ __extension__ \ ({ struct obstack *__h = (OBSTACK); \ obstack_blank (__h, (length)); \ obstack_finish (__h); }) -# define obstack_copy(OBSTACK, where, length) \ +#define obstack_copy(OBSTACK, where, length) \ __extension__ \ ({ struct obstack *__h = (OBSTACK); \ obstack_grow (__h, (where), (length)); \ obstack_finish (__h); }) -# define obstack_copy0(OBSTACK, where, length) \ +#define obstack_copy0(OBSTACK, where, length) \ __extension__ \ ({ struct obstack *__h = (OBSTACK); \ obstack_grow0 (__h, (where), (length)); \ @@ -381,7 +375,7 @@ extern int obstack_exit_failure; /* The local variable is named __o1 to avoid a name conflict when obstack_blank is called. */ -# define obstack_finish(OBSTACK) \ +#define obstack_finish(OBSTACK) \ __extension__ \ ({ struct obstack *__o1 = (OBSTACK); \ void *__value = (void *) __o1->object_base; \ @@ -396,7 +390,7 @@ extern int obstack_exit_failure; __o1->object_base = __o1->next_free; \ __value; }) -# define obstack_free(OBSTACK, OBJ) \ +#define obstack_free(OBSTACK, OBJ) \ __extension__ \ ({ struct obstack *__o = (OBSTACK); \ void *__obj = (OBJ); \ @@ -404,106 +398,6 @@ extern int obstack_exit_failure; __o->next_free = __o->object_base = (char *) __obj; \ else (__obstack_free) (__o, __obj); }) -#else /* not __GNUC__ */ - -# define obstack_object_size(h) \ - (unsigned) ((h)->next_free - (h)->object_base) - -# define obstack_room(h) \ - (unsigned) ((h)->chunk_limit - (h)->next_free) - -# define obstack_empty_p(h) \ - ((h)->chunk->prev == 0 \ - && (h)->next_free == __PTR_ALIGN ((char *) (h)->chunk, \ - (h)->chunk->contents, \ - (h)->alignment_mask)) - -/* Note that the call to _obstack_newchunk is enclosed in (..., 0) - so that we can avoid having void expressions - in the arms of the conditional expression. - Casting the third operand to void was tried before, - but some compilers won't accept it. */ - -# define obstack_make_room(h, length) \ - ((h)->temp.tempint = (length), \ - (((h)->next_free + (h)->temp.tempint > (h)->chunk_limit) \ - ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0)) - -# define obstack_grow(h, where, length) \ - ((h)->temp.tempint = (length), \ - (((h)->next_free + (h)->temp.tempint > (h)->chunk_limit) \ - ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0), \ - memcpy ((h)->next_free, where, (h)->temp.tempint), \ - (h)->next_free += (h)->temp.tempint) - -# define obstack_grow0(h, where, length) \ - ((h)->temp.tempint = (length), \ - (((h)->next_free + (h)->temp.tempint + 1 > (h)->chunk_limit) \ - ? (_obstack_newchunk ((h), (h)->temp.tempint + 1), 0) : 0), \ - memcpy ((h)->next_free, where, (h)->temp.tempint), \ - (h)->next_free += (h)->temp.tempint, \ - *((h)->next_free)++ = 0) - -# define obstack_1grow(h, datum) \ - ((((h)->next_free + 1 > (h)->chunk_limit) \ - ? (_obstack_newchunk ((h), 1), 0) : 0), \ - obstack_1grow_fast (h, datum)) - -# define obstack_ptr_grow(h, datum) \ - ((((h)->next_free + sizeof (char *) > (h)->chunk_limit) \ - ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \ - obstack_ptr_grow_fast (h, datum)) - -# define obstack_int_grow(h, datum) \ - ((((h)->next_free + sizeof (int) > (h)->chunk_limit) \ - ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \ - obstack_int_grow_fast (h, datum)) - -# define obstack_ptr_grow_fast(h, aptr) \ - (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr)) - -# define obstack_int_grow_fast(h, aint) \ - (((int *) ((h)->next_free += sizeof (int)))[-1] = (aint)) - -# define obstack_blank(h, length) \ - ((h)->temp.tempint = (length), \ - (((h)->chunk_limit - (h)->next_free < (h)->temp.tempint) \ - ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0), \ - obstack_blank_fast (h, (h)->temp.tempint)) - -# define obstack_alloc(h, length) \ - (obstack_blank ((h), (length)), obstack_finish ((h))) - -# define obstack_copy(h, where, length) \ - (obstack_grow ((h), (where), (length)), obstack_finish ((h))) - -# define obstack_copy0(h, where, length) \ - (obstack_grow0 ((h), (where), (length)), obstack_finish ((h))) - -# define obstack_finish(h) \ - (((h)->next_free == (h)->object_base \ - ? (((h)->maybe_empty_object = 1), 0) \ - : 0), \ - (h)->temp.tempptr = (h)->object_base, \ - (h)->next_free \ - = __PTR_ALIGN ((h)->object_base, (h)->next_free, \ - (h)->alignment_mask), \ - (((h)->next_free - (char *) (h)->chunk \ - > (h)->chunk_limit - (char *) (h)->chunk) \ - ? ((h)->next_free = (h)->chunk_limit) : 0), \ - (h)->object_base = (h)->next_free, \ - (h)->temp.tempptr) - -# define obstack_free(h, obj) \ - ((h)->temp.tempint = (char *) (obj) - (char *) (h)->chunk, \ - ((((h)->temp.tempint > 0 \ - && (h)->temp.tempint < (h)->chunk_limit - (char *) (h)->chunk)) \ - ? (void) ((h)->next_free = (h)->object_base \ - = (h)->temp.tempint + (char *) (h)->chunk) \ - : (__obstack_free) (h, (h)->temp.tempint + (char *) (h)->chunk))) - -#endif /* not __GNUC__ */ - #ifdef __cplusplus } /* C++ */ #endif diff --git a/stdlib/setenv.c b/stdlib/setenv.c index 2b8b6cafa0..0f325c5a20 100644 --- a/stdlib/setenv.c +++ b/stdlib/setenv.c @@ -70,8 +70,7 @@ __libc_lock_define_initialized (static, envlock) allow arbitrarily many changes of the environment given that the used values are from a small set. Outside glibc this will eat up all memory after a while. */ -#if defined _LIBC || (defined HAVE_SEARCH_H && defined HAVE_TSEARCH \ - && defined __GNUC__) +#if defined _LIBC || (defined HAVE_SEARCH_H && defined HAVE_TSEARCH) # define USE_TSEARCH 1 # include diff --git a/time/strptime_l.c b/time/strptime_l.c index f5e2f4f5d1..caf4a4c807 100644 --- a/time/strptime_l.c +++ b/time/strptime_l.c @@ -56,17 +56,11 @@ localtime_r (const time_t *t, struct tm *tp) #define match_char(ch1, ch2) if (ch1 != ch2) return NULL -#if defined __GNUC__ && __GNUC__ >= 2 -# define match_string(cs1, s2) \ +#define match_string(cs1, s2) \ ({ size_t len = strlen (cs1); \ int result = __strncasecmp_l ((cs1), (s2), len, locale) == 0; \ if (result) (s2) += len; \ result; }) -#else -/* Oh come on. Get a reasonable compiler. */ -# define match_string(cs1, s2) \ - (strncasecmp ((cs1), (s2), strlen (cs1)) ? 0 : ((s2) += strlen (cs1), 1)) -#endif /* We intentionally do not use isdigit() for testing because this will lead to problems with the wide character version. */ #define get_number(from, to, n) \ From patchwork Mon Nov 10 14:17:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 123965 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E59783858C52 for ; Mon, 10 Nov 2025 14:21:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E59783858C52 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=RoFqA7+V X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by sourceware.org (Postfix) with ESMTPS id 74DA83858C54 for ; Mon, 10 Nov 2025 14:17:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 74DA83858C54 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 74DA83858C54 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=172.234.252.31 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762784259; cv=none; b=v12B70xWHPBim2PWd5KC/xreQK6JUuuq8v34pJL6PJ0PaH4wOBgePN1TgJRXOqmex7ThuBnf4KGcm9v7G/RG9MygjslxmZoE175LSUNeooqu80U7gsNGo93dLkQRZxCAXG92kPwemv/Z7RoyM+YxnzSArxZWnBz8BiWpz6KDXgw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762784259; c=relaxed/simple; bh=UaT5hYygxdCNbd7ipZJUpfo/zMsHmiIu5/i5G0YW/Ok=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=R6XE1HxrmklNZuFsVjSmJY+s5bnod3LBty3NX+yKwBCuVD5lamZzCYiyx9Q8AVuX3B2fyTJv273zczunHzPshRJJPlNAPRguaByjtQJRoQWD/J3/b+AmRpmZ3conofb4+9WOZnohNpAhpb7IGjZj4cv6EzGWs9pG6xTrFcLUXOA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 74DA83858C54 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id DB43943680; Mon, 10 Nov 2025 14:17:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3CF25C19422; Mon, 10 Nov 2025 14:17:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1762784258; bh=UaT5hYygxdCNbd7ipZJUpfo/zMsHmiIu5/i5G0YW/Ok=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RoFqA7+VuzddCJbFwkCzE+BAXunK+pjk+bOkomEZL5zIfSNv4y7kB+d0Jgt9ePvue doA4YjLFRhoxemiZiKJQnBwBqcoePcz9wxbo9OIg49qXaH62mbkjtTOw6EOxc95vDO EeeCAnaAo3jlMSUGcgPEx24/koSAQ6SKyRPbD4aI9WQP4vIjSO97qDlAc44i+zMKpg oS4RaJxswi1ryC3uX5YRM5v6cXrxrdw3AFiqy6i6TcVRGXAqJaY5LOHjgZuH27IBpp Nwlsw2rPumQD3HbYgTigTqTa93MFObCXK9nokBKk4GBXHPSAk4DPwXHs7AFnOiDrK5 Eh0kGOZ8y+aEg== Date: Mon, 10 Nov 2025 15:17:35 +0100 From: Alejandro Colomar To: libc-alpha@sourceware.org Cc: Paul Eggert , Florian Weimer , Alejandro Colomar , "H.J. Lu" , Collin Funk , Bruno Haible Subject: [PATCH v3 4/7] include/features.h: If __GNUC__, assume defined(__GNUC_MINOR__) Message-ID: <89052714323e13442cbcd6d2106a9501d94be8a9.1762784073.git.alx@kernel.org> X-Mailer: git-send-email 2.51.0 References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org Signed-off-by: Alejandro Colomar --- include/features.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/features.h b/include/features.h index 673c4036cd..3031af6cc5 100644 --- a/include/features.h +++ b/include/features.h @@ -169,7 +169,7 @@ #endif Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was added in 2.0. */ -#if defined __GNUC__ && defined __GNUC_MINOR__ +#if defined __GNUC__ # define __GNUC_PREREQ(maj, min) \ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) #else From patchwork Mon Nov 10 14:17:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 123966 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 174043858C42 for ; Mon, 10 Nov 2025 14:24:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 174043858C42 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=j3yGfR7V X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by sourceware.org (Postfix) with ESMTPS id 00D693858C41 for ; Mon, 10 Nov 2025 14:17:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 00D693858C41 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 00D693858C41 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=172.234.252.31 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762784268; cv=none; b=ujhSeofsDjyE1oKLTLDoYDG9RU9Y70tlYB4Tys4q0AJOj1t553Bfebf+xl0ue1Ip0ZKBZaMwMlm1OePWclwfgcGDsdpcJ93SFwzrnWQjZenklp3aRqUrPf4F0mPp8EzEOuiT3Vjwk2I4mrSyD3UiTqvZKuaaLQyvQZP9KJBZOTM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762784268; c=relaxed/simple; bh=/sxkYJCIEriDogQX9II7rtpm38t287xvjAcjd5wel5U=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=XbBCh+4d/B71OzEs1Nj7kcSWltGuT7izDNRJSNxl9dxp9tySJdl0s6fmvMbBE+j/gKQItNsA6CgxBv84G4awR79gy7C173XMhSsNLpqD38yoChrAH9pN9Q+rUrKUKB5Lrd+pGR1C61RBGV7+U58BktfBHY2B+gIXkIFZmMsT4gw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 00D693858C41 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 66D4C43CB9; Mon, 10 Nov 2025 14:17:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7211C113D0; Mon, 10 Nov 2025 14:17:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1762784262; bh=/sxkYJCIEriDogQX9II7rtpm38t287xvjAcjd5wel5U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=j3yGfR7VzDnFKncYql3+JTwJvQME9fAV4RT++0R1PedvwiDDzLEG2mv6pIBdJpBEN TdxfY4lMFV4XfbbYARCIJtlvH2XjncmU7sGSt9ePx6FllxOPUd2PklG0k7dIj1W1ww B1eAOGiotFtTBCtU90HylJBuVh/pkMeIQFYbvd+kcqo348G/3l459XFX2jVXBsvXWF +D3uZa1Y7ymierW5+aJziso6VSaXJUaAJfjmL+VcR88ahy9BOPLDfAXWf7acoIoga5 H1IC1upoIsSdgaWx+VpV4bH/yYGY30EQGPR27loz2sHzYL6ozhdEyz9rqJEXNhHub+ M4R/8Xa01dfhQ== Date: Mon, 10 Nov 2025 15:17:39 +0100 From: Alejandro Colomar To: libc-alpha@sourceware.org Cc: Paul Eggert , Florian Weimer , Alejandro Colomar , "H.J. Lu" , Collin Funk , Bruno Haible Subject: [PATCH v3 5/7] include/limits.h: Assume GCC defines LLONG_{MAX,MIN} and ULLONG_MAX Message-ID: X-Mailer: git-send-email 2.51.0 References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org GCC defines these since GCC 3.4.5, in gcc.git 0c96ce220dae (2000-07-17; "* glimits.h (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Define for C99."). Signed-off-by: Alejandro Colomar --- include/limits.h | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/include/limits.h b/include/limits.h index 6370ccd84d..62dd78d56d 100644 --- a/include/limits.h +++ b/include/limits.h @@ -124,21 +124,6 @@ # include_next #endif -/* The files in some gcc versions don't define LLONG_MIN, - LLONG_MAX, and ULLONG_MAX. Instead only the values gcc defined for - ages are available. */ -#if defined __USE_ISOC99 && defined __GNUC__ -# ifndef LLONG_MIN -# define LLONG_MIN (-LLONG_MAX-1) -# endif -# ifndef LLONG_MAX -# define LLONG_MAX __LONG_LONG_MAX__ -# endif -# ifndef ULLONG_MAX -# define ULLONG_MAX (LLONG_MAX * 2ULL + 1) -# endif -#endif - /* The integer width macros are not defined by GCC's before GCC 7, or if _GNU_SOURCE rather than __STDC_WANT_IEC_60559_BFP_EXT__ is used to enable this feature. */ From patchwork Mon Nov 10 14:17:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 123967 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5A9053858406 for ; Mon, 10 Nov 2025 14:25:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5A9053858406 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=lEE0mEfs X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by sourceware.org (Postfix) with ESMTPS id 1AB8E3858CB6 for ; Mon, 10 Nov 2025 14:17:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1AB8E3858CB6 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1AB8E3858CB6 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=172.234.252.31 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762784267; cv=none; b=J2SOTogcDOfT8dtfClht5FaKSeUBS7korM/ClNlBIKdVgA2U4gYr40101yyyWrsyufPdPUf6NMuOdNGqsSKLEundcNdpxR+NBtTOoI/eIaUW3S57bIuSQznGsJP5IVWTqfhIQJIEsT8iJ4/IXaioYPuHZI4TnQ8l0iCFNT/MMiA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762784267; c=relaxed/simple; bh=599KLp4uEIP0E311ZgcBCd6pvxpfQLRsn34xAcHIpNM=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=efhZ1hVZc/8rzIAeKQmwjWX+SGzApK8ELzLVs8Y9kGTLl7rvKzl4gYyEw8nhFsgBqClGp7kOpLU1JG2KvbPuNP+O7A7s6PSlWxDmXcY/2j5Y92dipi+OvcrAa0cl9JwefBv74QeLv9cvfskzsDMEZPEafXL0IJ/8dWu6E9W4JM0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1AB8E3858CB6 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 39475445F1; Mon, 10 Nov 2025 14:17:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A3E1C16AAE; Mon, 10 Nov 2025 14:17:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1762784266; bh=599KLp4uEIP0E311ZgcBCd6pvxpfQLRsn34xAcHIpNM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lEE0mEfs+WsYiyyDsIB2YiA+/BfWq5jU0uQie4nKnt9aFa9cvgmfF1sCsc2cMjN5q 2+Z6jchpGX9XIqXjn5Xmd5NyYgFQhoKuI2IL/d1oWsPWsfFS/tXq3Ek8a/o98uXAX/ 86mLjMF1oMv8ImCS3o+PAp8vbCv8gz/1X6MOsWwbEVQHz90cV91u/EvCgW5qNG94Lp Ow1cS1a6TkfgeqbjXEQViVhBdwzLctszwAvYBgUCXqaQPz5Xji+EJ1u/i+vMYY05kd Sk2j6Q9wNAs0wLrf/qwh0EALV9l9lswflshTTsDCFGQ+42yaTq+qUeo4KjYsSkaZM3 Rylhy3a1aCnzw== Date: Mon, 10 Nov 2025 15:17:42 +0100 From: Alejandro Colomar To: libc-alpha@sourceware.org Cc: Paul Eggert , Florian Weimer , Alejandro Colomar , "H.J. Lu" , Collin Funk , Bruno Haible Subject: [PATCH v3 6/7] Assume GCC defines va_list Message-ID: <556aae80a5194c715d7c846357a52dc32c863c81.1762784073.git.alx@kernel.org> X-Mailer: git-send-email 2.51.0 References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org GCC defines va_list since EGCS, in gcc.git c4f0e4979f97 (1995-02-21; "Test _VA_LIST_DEFINED macro."). Signed-off-by: Alejandro Colomar --- libio/stdio.h | 7 +------ wcsmbs/wchar.h | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/libio/stdio.h b/libio/stdio.h index e0e70945fa..02875b8829 100644 --- a/libio/stdio.h +++ b/libio/stdio.h @@ -48,12 +48,7 @@ __BEGIN_DECLS #endif #if defined __USE_XOPEN || defined __USE_XOPEN2K8 -# ifdef __GNUC__ -# ifndef _VA_LIST_DEFINED -typedef __gnuc_va_list va_list; -# define _VA_LIST_DEFINED -# endif -# else +# ifndef __GNUC__ # include # endif #endif diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h index b31ca2d241..f6198f3acc 100644 --- a/wcsmbs/wchar.h +++ b/wcsmbs/wchar.h @@ -38,12 +38,7 @@ #include #if defined __USE_XOPEN2K || defined __USE_XOPEN2K8 -# ifdef __GNUC__ -# ifndef _VA_LIST_DEFINED -typedef __gnuc_va_list va_list; -# define _VA_LIST_DEFINED -# endif -# else +# ifndef __GNUC__ # include # endif #endif From patchwork Mon Nov 10 14:17:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 123969 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E9C753858C25 for ; Mon, 10 Nov 2025 14:28:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E9C753858C25 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=qDU3gJDP X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sea.source.kernel.org (sea.source.kernel.org [IPv6:2600:3c0a:e001:78e:0:1991:8:25]) by sourceware.org (Postfix) with ESMTPS id 7E99E3858D20 for ; Mon, 10 Nov 2025 14:17:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7E99E3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7E99E3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2600:3c0a:e001:78e:0:1991:8:25 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762784270; cv=none; b=JQgFmD8c0HUTx6nFZ7ws0uZYcVj3ok6l9aMLzn5lW6BppXYmTnPw2qBh/9AyJZ/jIBQD1o6egMq4FX6Hm6rVFG0GztfpndrOJuSdnxcdDlrSgCp79W7elt0TDsMPHE2sq/pbWVai5oOwGxQ05ki8Nd6jV6unTos/7o9UEiMOLW4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762784270; c=relaxed/simple; bh=cyMUUVVjzXyTqqeUnaiP33jtac3+zPTmnk6ZDRu2Nbs=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=bMQngUlmzCDmr+pImAdJ2rsAAR6PRKiPubXXk4FPW76B0X5gdTN4v61/lL7cZKClHs+s3Ku+pvHdiuJW2Wh37JzLPsBTJRFjlf4aPle2v1X3EAg/GstoGwubQ5t14zW/aWBZbtV2Lvlq6Vht5iEsi8GqS3eokrj4P/EpcWg7Ntw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7E99E3858D20 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id D1AD843583; Mon, 10 Nov 2025 14:17:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20DB1C2BC86; Mon, 10 Nov 2025 14:17:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1762784269; bh=cyMUUVVjzXyTqqeUnaiP33jtac3+zPTmnk6ZDRu2Nbs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qDU3gJDPMmAJ+PKziSFdFFk5fJnaeJCqtUgHOyPQ9bGnxbgGxLLbMtStuZIL12sPb EkexV9n9wtdDUQYuwlQ/3bXVKgSH4EshbaGw7XuX5Begf0Zi58Un5/G7U1OMo+Otke wFpydLgx76TV4m5OoElOoPIkRQvaqLEX54lWcNVHjDjSd4WUfd8Og+ctVNGr0etzvE XagNUYKCMjffC/tb/TEvxyYnONBv56OaA1VyL8RJTFwIBDcYIGoEHy7lI2Hhbi8bVc 9oA+4vCbettmJX+S0W7Viqv9/ynC8vkhzz0rqrztc0MQt/MKwFK9juY6zMJKcySJRn A2QVYd6qjmHmg== Date: Mon, 10 Nov 2025 15:17:46 +0100 From: Alejandro Colomar To: libc-alpha@sourceware.org Cc: Paul Eggert , Florian Weimer , Alejandro Colomar , "H.J. Lu" , Collin Funk , Bruno Haible Subject: [PATCH v3 7/7] stdio-common/vfscanf-internal.c: Assume support for 'long long' Message-ID: <1d9d1e6e0b5c76fc62cbb4a95b5beaa681f56b0f.1762784073.git.alx@kernel.org> X-Mailer: git-send-email 2.51.0 References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org GCC supports 'long long' since GCC 1.x. Signed-off-by: Alejandro Colomar --- stdio-common/vfscanf-internal.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/stdio-common/vfscanf-internal.c b/stdio-common/vfscanf-internal.c index c6361f74e0..8720cc300a 100644 --- a/stdio-common/vfscanf-internal.c +++ b/stdio-common/vfscanf-internal.c @@ -33,13 +33,6 @@ #include #include -#ifdef __GNUC__ -# define HAVE_LONGLONG -# define LONGLONG long long -#else -# define LONGLONG long -#endif - /* Determine whether we have to handle `long long' at all. */ #if LONG_MAX == LONG_LONG_MAX # define need_longlong 0 @@ -1976,7 +1969,7 @@ digits_extended_fail: if (flags & NUMBER_SIGNED) { if (need_longlong && (flags & LONGDBL)) - *ARG (LONGLONG int *) = num.q; + *ARG (long long int *) = num.q; else if (need_long && (flags & LONG)) *ARG (long int *) = num.l; else if (flags & SHORT) @@ -1989,7 +1982,7 @@ digits_extended_fail: else { if (need_longlong && (flags & LONGDBL)) - *ARG (unsigned LONGLONG int *) = num.uq; + *ARG (unsigned long long int *) = num.uq; else if (need_long && (flags & LONG)) *ARG (unsigned long int *) = num.ul; else if (flags & SHORT)