git: 4365a13bda5f - main - cdefs: Document what we do when _XOPEN_SOURCE is an empty string
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 20 Nov 2024 21:36:04 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4365a13bda5fb9f930b9cca7f9797537695441d7 commit 4365a13bda5fb9f930b9cca7f9797537695441d7 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-11-20 20:51:18 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-11-20 21:35:56 +0000 cdefs: Document what we do when _XOPEN_SOURCE is an empty string X/Open originally had _XOPEN_SOURCE defined to signify conformance with the Single Unix Specification, starting with its third iteration. There it defined _XOPEN_SOURCE being defined as the same thing as _POSIC_C_SOURCE=2, though the different versions of the spec had slight variances as to what's defined and wheter or not _XOPEN_SOURCE_EXTENSION needed to be defined. Document that we don't do anything in this case. It turns out that enabling the proper strict environment breaks at least some old software, so for the moment it's a nop until that can be sorted out (though that is a very low proprity task). Sponsored by: Netflix --- share/man/man9/cdefs.9 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/share/man/man9/cdefs.9 b/share/man/man9/cdefs.9 index 350e5d773004..0edd6e8392ca 100644 --- a/share/man/man9/cdefs.9 +++ b/share/man/man9/cdefs.9 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: BSD-2-Clause .\" -.Dd July 20, 2024 +.Dd November 20, 2024 .Dt CDEFS 9 .Os .Sh NAME @@ -357,6 +357,10 @@ However, system headers not defined by that standard may define extensions. .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 St -p1003.1-2024 including ISO/IEC 9899:2018 ("ISO C17"), +.It Dv _XOPEN_SOURCE defined Ta St -p1003.1-90 with XPG Extensions to St -susv1 including St -ansiC . +However, +.Fx +implements this as a NOP because too much software breaks with the correct strict environment. .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