From nobody Tue Jul 26 03:34:06 2022 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 4LsMvz04Zyz4Wvq3; Tue, 26 Jul 2022 03:34:07 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LsMvy6dbHz3H5K; Tue, 26 Jul 2022 03:34:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658806446; 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=hTjT4chxBQaUkzrlmZUaoZ2gqdqSnhdqz2mbmRI4rqc=; b=rvxnegCkmok1tp0nPiM+GAeVpqMVhkYS482a8B3nxL6giDlv9feJFRrMWSavGQDLYwrCi/ 3C3g7IQ1Yp1l7Oy/AznQS9QVgn4I9oM1wo1/POM8MZv8xOKvl3RbQ6UzbtAyFIuRenaQub nRF7cehR9Sx1ZQxxalBVFXNou+eAl7K+UqIJbvL5RUF0j2SEELUpdyBtboXbNtqrg8qIUG rfLDVaIHSfiW1hRKu0eQa+pnEjyfPi3sNRRYpHQ3z0UgipEO5wNvUBTda+DeW7vBgBJS/Y eLbsn6rfn/glu0Z+6MdW5ESmVST8NOctH9hmogVYLAwIYNoMljIu9Yo7EBCegQ== 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 4LsMvy5h0VzMfH; Tue, 26 Jul 2022 03:34:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26Q3Y6HW032121; Tue, 26 Jul 2022 03:34:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26Q3Y6bp032120; Tue, 26 Jul 2022 03:34:06 GMT (envelope-from git) Date: Tue, 26 Jul 2022 03:34:06 GMT Message-Id: <202207260334.26Q3Y6bp032120@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: be54920c3b72 - main - cdefs: Add some notes about the different versions of POSIX 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: be54920c3b72f0b9284ddaf95796df25dca3eaf5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658806446; 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=hTjT4chxBQaUkzrlmZUaoZ2gqdqSnhdqz2mbmRI4rqc=; b=q5xs3XNsY9fCSR6XXP37cxSteCqSZhRvNq16jJWwH6IWotqmq2Bqq+tLR2UTGFBBbatQAW Q4ePrucRIFK+Lhb845Wsj6Rnn8tfN5EvXyRrGEZLmgXayPu7eVcJ86Br2RaAf7KQuGFk50 9bHFUhcCpCtwDMwBga9GnRnVeczYf1NXJEu0ucPCBOaQ2BUxCQBB3LDCCXL/lqWrTNCi1i SfsG7sjon9+5eqsEqvXwLcGw4L3fVojaWvRpbADHLZoRQt6XIm2RlDEQEImR1j6xvzdJ4w Alsvtl1cW0c8KMjF7ss3H+qmI29wgy+Eu38aM8sdxn09nFB4V0/Rt4La9OlhDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658806446; a=rsa-sha256; cv=none; b=tbOhNYPVD5RccFPryHq2ao8k0JZcw7DrOS+8qGB1PzVh+rmk00LmHh91EKoLJKNcIWdbC7 8BDVF+T/nmvqLy+Xt4qVj+wIZprGnhnjGoSVvR5mP9S8XScFLXl7LL0UGAePlY1Bntidgz vAe1L5Iqk2psDP80O9aZZLr0HJPtnrMJXl0wgVE0y23amrRy0Q6l7ppcrfATwnS8MremtI 7/v76m+LZ8IYmlCBY3U0nc9u7dFoymdqIzSKqGbEojvlw9I528uH9KZHtwCiB/SDP3C0ny siFtJubwVOt9jTAjWU4qMcloiBttxc0JSOu0Dv46mwkRTg7rmp8Bes/+/reFQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=be54920c3b72f0b9284ddaf95796df25dca3eaf5 commit be54920c3b72f0b9284ddaf95796df25dca3eaf5 Author: Warner Losh AuthorDate: 2022-07-25 22:19:28 +0000 Commit: Warner Losh CommitDate: 2022-07-26 03:34:34 +0000 cdefs: Add some notes about the different versions of POSIX POSIX versions are a bit weird, so add some notes here. Sponsored by: Netflix --- sys/sys/cdefs.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 2295dd39f5ad..1ace5fbee787 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -637,15 +637,23 @@ * POSIX.1 requires that the macros we test be defined before any standard * header file is included. * - * Here's a quick run-down of the versions: + * Here's a quick run-down of the versions (and some informal names) * defined(_POSIX_SOURCE) 1003.1-1988 + * encoded as 198808 below * _POSIX_C_SOURCE == 1 1003.1-1990 + * encoded as 199009 below * _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option + * encoded as 199209 below * _POSIX_C_SOURCE == 199309 1003.1b-1993 + * (1003.1 Issue 4, Single Unix Spec v1, Unix 93) * _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, * and the omnibus ISO/IEC 9945-1: 1996 - * _POSIX_C_SOURCE == 200112 1003.1-2001 - * _POSIX_C_SOURCE == 200809 1003.1-2008 + * (1003.1 Issue 5, Single Unix Spec v2, Unix 95) + * _POSIX_C_SOURCE == 200112 1003.1-2001 (1003.1 Issue 6, Unix 03) + * _POSIX_C_SOURCE == 200809 1003.1-2008 (1003.1 Issue 7) + * IEEE Std 1003.1-2017 (Rev of 1003.1-2008) is + * 1003.1-2008 with two TCs applied with + * _POSIX_C_SOURCE=200809 and _XOPEN_SOURCE=700 * * In addition, the X/Open Portability Guide, which is now the Single UNIX * Specification, defines a feature-test macro which indicates the version of