STANDARDS(7) BSD Miscellaneous Information Manual STANDARDS(7)NAMEstandards — standards supported by DragonFly
SYNOPSIS
#define _XOPEN_SOURCE 600
#include <sys/cdefs.h>
DESCRIPTION
A number of “feature test macros”, namely _POSIX_C_SOURCE and
_XOPEN_SOURCE, can be used by applications to indicate desired sets of
features (beyond those specified by the C standard) in the programming
environment supplied by DragonFly. These macros determine which proto‐
types are exposed by header files and so on.
If neither _POSIX_C_SOURCE and _XOPEN_SOURCE are set, the programming
environment defaults to Version 3 of the Single UNIX Specification
(“SUSv3”). In addition, a number of BSD specific prototypes, definitions
etc. are made visible.
POSIX Standards (_POSIX_C_SOURCE)
The value of the _POSIX_C_SOURCE macro determines which POSIX standard
the programming environment conforms to.
1 Make definitions conforming to ISO/IEC 9945-1:1990 (“POSIX.1”)
visible. Implies ISO/IEC 9899:1990 (“ISO C90”).
2 Additionally, make definitions conforming to IEEE Std 1003.2-1992
(“POSIX.2”) visible.
199009 Same as 1.
199209 Same as 2.
199309 Additionally, make definitions conforming to IEEE Std
1003.1b-1993 (“POSIX.1”) visible.
199506 Additionally, make definitions conforming to IEEE Std
1003.1c-1995 (“POSIX.1”) visible.
200112 Additionally, make definitions conforming to IEEE Std 1003.1-2001
(“POSIX.1”) visible. Implies ISO/IEC 9899:1999 (“ISO C99”).
This is the default.
200809 Additionally, make definitions conforming to IEEE Std 1003.1-2008
(“POSIX.1”) visible. Implies ISO/IEC 9899:1999 (“ISO C99”).
Defining _POSIX_C_SOURCE to any value lower than 199009 (other than 1 or
2) makes it default to 198808 which makes definitions conforming to IEEE
Std 1003.1-1988 (“POSIX.1”) visible. No C standard is implied in this
case.
Defining the obsolete _POSIX_SOURCE macro without defining
_POSIX_C_SOURCE is equivalent to defining _POSIX_C_SOURCE to 198808.
X/Open CAE Specifications (_XOPEN_SOURCE)
The value of the _XOPEN_SOURCE macro determines which X/Open CAE specifi‐
cation the programming environment conforms to.
500 Make defintions conforming to the Version 2 of the Single UNIX
Specification (“SUSv2”) visible. Implies defining _POSIX_C_SOURCE
to 199506.
600 Make definitions conforming to the Version 3 of the Single UNIX
Specification (“SUSv3”) visible. Implies defining _POSIX_C_SOURCE
to 200112. This is the default.
700 Make definitions conforming to IEEE Std 1003.1-2008 (“POSIX.1”) and
to the corresponding XSI extensions visible.
If both CAE and POSIX conformance is required, only _XOPEN_SOURCE can be
set.
HISTORY
A standards manual page first appeared in DragonFly 2.7.
BSD November 6, 2010 BSD