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, Feb 18, 6:48 PM
Unknown Object (File)
Jan 5 2025, 6:43 PM
Unknown Object (File)
Dec 30 2024, 5:09 AM
Unknown Object (File)
Dec 29 2024, 10:37 AM
Unknown Object (File)
Dec 27 2024, 11:42 AM
Unknown Object (File)
Dec 27 2024, 10:24 AM
Unknown Object (File)
Dec 27 2024, 12:15 AM
Unknown Object (File)
Dec 26 2024, 1:10 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.