Message ID | 20250105055750.1668721-6-eggert@cs.ucla.edu (mailing list archive) |
---|---|
State | New |
Headers |
Return-Path: <libc-alpha-bounces~patchwork=sourceware.org@sourceware.org> 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 294113858CDA for <patchwork@sourceware.org>; Sun, 5 Jan 2025 06:01:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 294113858CDA Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=cs.ucla.edu header.i=@cs.ucla.edu header.a=rsa-sha256 header.s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C header.b=o3zMhuTD X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail.cs.ucla.edu (mail.cs.ucla.edu [131.179.128.66]) by sourceware.org (Postfix) with ESMTPS id A53D23858D21 for <libc-alpha@sourceware.org>; Sun, 5 Jan 2025 05:58:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A53D23858D21 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=cs.ucla.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cs.ucla.edu ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A53D23858D21 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=131.179.128.66 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736056710; cv=none; b=aO0YWoYou33aDR4jOStvFaipepjjeYq8UtpAUUGCFas8doeFiq3pJjJkttsYw+B489lJ/PuTgJuccKid8GiwcbNti7d2Plm6lEFsE0/n0Yf9oEGR7KarGIcnbDgM/ykGm97TCyM1mv4QVuYaMUbV9uGue6eqTbKgtXL+gKWqk0U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736056710; c=relaxed/simple; bh=Cc+efVkUG+5IUm3bwbc6eAUc1isFRgEJ0qFyLZH5+Zs=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=pBVH8ymhhyTsF7dJ4LBXXfsfSXWSGNHd7HJZaShp44VwKDhMDvoTdeBNpLCQ+14BSCoFp3K1fS+zlA+bM1Se9jCUstTLuw2xG0RMnVewDQ4bt+pD0X1qXLfgJtF3f+qi11E7cBqlqMkALUMygCocs//PRGHsDqDL1aE5Yc4Qlj8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A53D23858D21 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 22B3E3C123844 for <libc-alpha@sourceware.org>; Sat, 4 Jan 2025 21:58:25 -0800 (PST) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id WcklPoQ0eYCT; Sat, 4 Jan 2025 21:58:24 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id C83113C123843; Sat, 4 Jan 2025 21:58:24 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu C83113C123843 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1736056704; bh=ihbYVsg7lkDbxamJWKBglLgxHWE0AmEThPgP4ZU/dRM=; h=From:To:Date:Message-ID:MIME-Version; b=o3zMhuTDqF5X4KWSwvaDeKXKvPM/K1iT4UnybE7gcWxix/PEHhBUKpVk8xgY+6TOf f/XK/dZEvK2jtGJZtwaVlDAXROBtaUxkVjyNTEXvqjDF72BNwaRtvJjYAAO2IR3rrA op3lToLwg9E00fpUvHDrfQIhohkB1VzUUiTiMEcJsWTR9jhml/Tn2JymukglMSlfiC cjsiV2A1k5nY1TdW56tPFPk6DOuXnw8IppMcH5AFTucrziHpn91B84ELKGol26qapy ZyjBxJQVpqQc9e2PP+n9UflU5DHXOc2c5RurGffvny3kzQT1np6fCaEDfnSqLmnU4E +6OM96u/sHQGA== X-Virus-Scanned: amavis at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id H3tz100xZaoU; Sat, 4 Jan 2025 21:58:24 -0800 (PST) Received: from wing.home (unknown [47.154.28.214]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id B07F53C082EB9; Sat, 4 Jan 2025 21:58:24 -0800 (PST) From: Paul Eggert <eggert@cs.ucla.edu> To: libc-alpha@sourceware.org Cc: Paul Eggert <eggert@cs.ucla.edu> Subject: [PATCH 05/59] Support static_assert in pre-C23 C Date: Sat, 4 Jan 2025 21:56:40 -0800 Message-ID: <20250105055750.1668721-6-eggert@cs.ucla.edu> X-Mailer: git-send-email 2.45.2 In-Reply-To: <01207110-bd60-46ae-9c08-fb39c2011067@cs.ucla.edu> References: <01207110-bd60-46ae-9c08-fb39c2011067@cs.ucla.edu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, 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 <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org |
Series |
time: sync mktime from Gnulib
|
|
Checks
Context | Check | Description |
---|---|---|
redhat-pt-bot/TryBot-apply_patch | success | Patch applied to master at the time it was sent |
Commit Message
Paul Eggert
Jan. 5, 2025, 5:56 a.m. UTC
* include/sys/cdefs.h (static_assert) [!C++ && __STDC_VERSION__ < 202311]: New macro. * timezone/private.h, timezone/version: Copy from tzcode git. --- include/sys/cdefs.h | 8 ++++++++ timezone/private.h | 2 +- timezone/version | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h index a676f75f62..cd3127aaca 100644 --- a/include/sys/cdefs.h +++ b/include/sys/cdefs.h @@ -7,6 +7,14 @@ # define _Static_assert(expr, diagnostic) _Static_assert (expr, diagnostic) #endif +/* Support single-arg static_assert in C code even on pre-C23 compilers, + for compatibility with Gnulib. */ +#if (!defined __cplusplus \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 202311) \ + && !defined static_assert) +# define static_assert(expr) _Static_assert (expr, #expr) +#endif + #include <misc/sys/cdefs.h> #ifndef _ISOMAC diff --git a/timezone/private.h b/timezone/private.h index c33041049f..3db0121135 100644 --- a/timezone/private.h +++ b/timezone/private.h @@ -50,7 +50,7 @@ # include <stdbool.h> #endif -#if __STDC_VERSION__ < 202311 +#if __STDC_VERSION__ < 202311 && !defined static_assert # define static_assert(cond) extern int static_assert_check[(cond) ? 1 : -1] #endif diff --git a/timezone/version b/timezone/version index 04fe674443..c6db4af447 100644 --- a/timezone/version +++ b/timezone/version @@ -1 +1 @@ -2024a +2024b-11-gaf54a9e