Page MenuHomeFreeBSD

cdefs.h: Document the _XOPEN_SOURCE - 0 construct
ClosedPublic

Authored by imp on Nov 14 2024, 11:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 14, 5:13 AM
Unknown Object (File)
Fri, Oct 10, 12:33 AM
Unknown Object (File)
Tue, Sep 23, 11:40 PM
Unknown Object (File)
Sep 6 2025, 6:13 AM
Unknown Object (File)
Aug 19 2025, 9:34 PM
Unknown Object (File)
Aug 14 2025, 10:53 PM
Unknown Object (File)
Aug 14 2025, 12:53 PM
Unknown Object (File)
Jul 29 2025, 9:16 AM
Subscribers
None

Details

Summary

Various System V Interface Definition editions, as well as the X/Open
group portability guide issue 4, recommend defining _XOPEN_SOURCE and
broadly intimating it means the same thing as _POSIX_SOURCE == 2.

Starting in X/Open issue 5 (1995), _XOPEN_SOURCE needs to be defined to
be 500 to bring in the newer interfaces. However, it is still common hat
sources define _XOPEN_SOURCE to be blank. To deal with that, we subtract
0 from _XOPEN_SOURCE to make the other expressions well formed.

While here, define _POSIX_C_SOURCE to be 199209 based on the SVID, the
first version of the Single Unix Specification, and X/Open CAE issue 4,
version 2.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Nov 14 2024, 11:36 PM
imp created this revision.

Makes sense in an everything is awful sort of way. :)

This revision is now accepted and ready to land.Nov 14 2024, 11:47 PM

chicken out on changing behavior along with this new comment. See the comments
for why :)

This revision now requires review to proceed.Nov 14 2024, 11:51 PM
This revision was not accepted when it landed; it landed in state Needs Review.Nov 15 2024, 2:02 AM
This revision was automatically updated to reflect the committed changes.