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
This commit is contained in:
Warner Losh 2024-11-20 13:51:18 -07:00
parent 7a3af393d8
commit 4365a13bda

View File

@ -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