From nobody Fri Nov 15 02:02:12 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XqKyr51GTz5dR25; Fri, 15 Nov 2024 02:02:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqKyr2Vtnz4d27; Fri, 15 Nov 2024 02:02:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731636132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AmX4VdAvuy+YILuYbXpiYRHJeNv0PuMywel1PQ6pbqw=; b=jvWrFaQ7jSFjL3JUk9en/03WAcMjkzDA9sqnYMOl1PmTP+5UgrFDVkzWQqpCifN8yvWkSG tL4cSZqhm1w+i2PlJf3CsG1o6jBpKONfl3/UzfC6iG7lyaRPGzp8vPjY/zV2dZh5bCqrOV zv+dfw3zzuubQLcq7e03AfHGf/jZQ+sIN83AYiul5QTRsE1avF7pL9Pwts+eW9JUN1v/Yu /TxR2pnNPwHiF7brNOaimpJSqveKCDjn2HplZfAHkvlkjNFErEt6p1g50Nrc/zpzl/bhrh sh7blFMmwsNpZdXqJTNJW16ty/CioOgAPsBVe+yV6iiqefj6AicM1a7vLHVsNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731636132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AmX4VdAvuy+YILuYbXpiYRHJeNv0PuMywel1PQ6pbqw=; b=qeI1Y4udD3rXas5ReuE44Ne7LOA2YgRH10aXp8JnMGXLe8XIBw6pLBI0H6iNKM32xur5Fw 7vByq4e9AR2/183MIS0w029Ujult94Q274UxPsQPH7cq6kWM5T9O4BsGycBPHomBz4iDTo XBCRD04xkCIJBP+xuQGIocDwQZwFokINWC1Ql0TFFC0hiztti9SVMZgvq2KVBGn51+RK2c U8S1VTX8Xa4eNi9YZN8/jK9jqz0+Xzoc6ykw6zJHutDKJBWN3fAOJT+6Rye2EicmV506S0 +MpARvK58gUm9NekmtKO9IgzD+5YIkRbPEG0y0dE8dUwOsbG4z4EFnpM1ieMcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731636132; a=rsa-sha256; cv=none; b=EOSbyLXD2ib9B3U780NJFG4wScurjwwJNxXeQq8EUk3BlVITe1ZCDBlHt2pr7WXvZ/Tf9y M9MMgRAooGzaaFaE3Q66GsveYJIFzDgqHK83ppMksjfCEjOc+uLfrUZI9Xv2Kf497vwF91 NzFj3jMCygM5OI4TkyLfOt9ufZGv8rRLvLgBLtWip3N7RhKOnpnI4+MXTwo6koxKSknzJU 330S0zKUa9Rq0r3Yl/3IN+1vdIPyY7xnEakR4a3lYu1Ty/VCrHg1KIXCOmayCoJrjgg4Pa ue8rYlNg/K+E8HVUaqo44stHQ+bSxmzyFwoTjvl26Pkx9xJElnYlTWMI+Vf+mQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XqKyr23vWz13kB; Fri, 15 Nov 2024 02:02:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AF22Cdf049154; Fri, 15 Nov 2024 02:02:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AF22Cxx049151; Fri, 15 Nov 2024 02:02:12 GMT (envelope-from git) Date: Fri, 15 Nov 2024 02:02:12 GMT Message-Id: <202411150202.4AF22Cxx049151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 75b635c77443 - main - cdefs: update for C23 and POSIX24 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 75b635c774436d6ced8113e04dadbd5b859fea42 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=75b635c774436d6ced8113e04dadbd5b859fea42 commit 75b635c774436d6ced8113e04dadbd5b859fea42 Author: Warner Losh AuthorDate: 2024-11-14 23:52:56 +0000 Commit: Warner Losh CommitDate: 2024-11-15 02:01:12 +0000 cdefs: update for C23 and POSIX24 Also tweak a few placs where we can now use macros for C23 and POSIX24. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D47580 --- share/man/man9/cdefs.9 | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/share/man/man9/cdefs.9 b/share/man/man9/cdefs.9 index 3d1f6159bc60..38762c22f586 100644 --- a/share/man/man9/cdefs.9 +++ b/share/man/man9/cdefs.9 @@ -303,7 +303,7 @@ to distinguish it from newer standards. Support for this compilation environment is dependent on compilers supporting this configuration. Most of the old forms of C have been deprecated or removed in -ISO/IEC 9899:2024 (“ISO C23”). +.St -isoC-2024 . Compilers make compiling in this mode increasingly difficult and support for it may ultimately be removed from the tree. .It St -ansiC @@ -333,11 +333,11 @@ since there are no new C17 only symbols or macros. .Pp This version of the standard did not introduce any new features, only made minor, technical corrections. -.It ISO/IEC 9899:2024 (“ISO C23”) +.It St -isoC-2024 .Dv __STDC_VERSION__ = 202311L Strict environment selected with .Dv _C23_SOURCE -though this is not yet implemented. +though ISO C23 support is only partially implemented. .El .Pp For more information on C standards, see @@ -356,25 +356,37 @@ However, system headers not defined by that standard may define extensions. .It Dv _POSIX_C_SOURCE = 199506 Ta St -p1003.1c-95 including St -ansiC .It Dv _POSIX_C_SOURCE = 200112 Ta St -p1003.1-2001 including St -isoC-99 .It Dv _POSIX_C_SOURCE = 200809 Ta St -p1003.1-2008 including St -isoC-99 -.It Dv _POSIX_C_SOURCE = 202405 Ta in the future IEEE Std 1003.1-2024 (“POSIX.1”) including ISO/IEC 9899:2024 (“ISO C23”) +.It Dv _POSIX_C_SOURCE = 202405 Ta St -p1003.1-2024 including ISO/IEC 9899:2018 ("ISO C17"), .It Dv _XOPEN_SOURCE = 500 Ta St -p1003.1c-95 and XPG extensions to St -susv2 including St -ansiC .It Dv _XOPEN_SOURCE = 600 Ta St -p1003.1-2001 and XPG extensions to St -susv3 including St -isoC-99 .It Dv _XOPEN_SOURCE = 700 Ta St -p1003.1-2008 and XPG extensions to St -susv4 including St -isoC-99 -.It Dv _XOPEN_SOURCE = 800 Ta in the future IEEE Std 1003.1-2024 (“POSIX.1”) and XPG extensions to Version 5 of the Single UNIX Specification (“SUSv5”) including ISO/IEC 9899:2024 (“ISO C23”) +.It Dv _XOPEN_SOURCE = 800 Ta St -p1003.1-2024 and XPG extensions to Version 5 of the Single UNIX Specification (“SUSv5”) including ISO/IEC 9899:2018 (“ISO C17”) .It Dv _ANSI_SOURCE Ta St -ansiC .It Dv _C99_SOURCE Ta St -isoC-99 .It Dv _C11_SOURCE Ta St -isoC-2011 -.It Dv _C23_SOURCE Ta in the future ISO/IEC 9899:2024 (“ISO C23”) +.It Dv _C23_SOURCE Ta St -isoC-2024 .It Dv _BSD_SOURCE Ta Everything, including Fx extensions .El .Pp +Note: +.St -p1003.1-2024 +and XPG extensions to Version 5 of the Single UNIX Specification ("SUSv5") +support is incomplete. +.Pp When both POSIX and C environments are selected, the POSIX environment selects which C environment is used. However, when C11 dialect is selected with .St -p1003.1-2008 , definitions for .St -isoC-2011 -are included. +are also included. +Likewise, when C23 dialog is selected with +.St -p1003.1-2008 +or +.St -p1003.1-2024 , +definitions for +.St -isoC-2023 +are also included. .Ss Header Visibility Macros These macros are set by .Nm @@ -393,13 +405,13 @@ by convention with 199009 for and 199209 .St -p1003.1-90 . .It Dv __ISO_C_VISIBLE Ta The C level that's visible. -Possible values include 1990, 1999, and 2011 for +Possible values include 1990, 1999, 2011, 2017 and 2023 for .St -isoC-90 , -.St -isoC-99 -and -.St -isoC-2011 +.St -isoC-99 , +.St -isoC-2011 , +ISO/IEC 9899:2018 ("ISO C17"), and +.St -isoC-2024 , respectively. -In the future, 2023 will be used for ISO C2023. .It Dv __BSD_VISIBLE Ta 1 if the .Fx extensions are visible, 0 otherwise.