Skip to content

Commit

Permalink
<sys/cdefs.h>: Add some definitions for IEEE 1003.1-2008.
Browse files Browse the repository at this point in the history
Our default remains 200112 for now.
  • Loading branch information
Sascha Wildner committed Nov 6, 2010
1 parent 88cfb1f commit ae2ee8e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
12 changes: 11 additions & 1 deletion share/man/man7/standards.7
Expand Up @@ -29,7 +29,7 @@
.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd July 4, 2010
.Dd November 6, 2010
.Dt STANDARDS 7
.Os
.Sh NAME
Expand Down Expand Up @@ -98,6 +98,12 @@ visible.
Implies
.St -isoC-99 .
This is the default.
.It Li 200809
Additionally, make definitions conforming to
.St -p1003.1-2008
visible.
Implies
.St -isoC-99 .
.El
.Pp
Defining
Expand Down Expand Up @@ -146,6 +152,10 @@ Implies defining
to
.Li 200112 .
This is the default.
.It Li 700
Make definitions conforming to
.St -p1003.1-2008
and to the corresponding XSI extensions visible.
.El
.Pp
If both CAE and POSIX conformance is required, only
Expand Down
12 changes: 10 additions & 2 deletions sys/sys/cdefs.h
Expand Up @@ -384,6 +384,7 @@
* _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995,
* and the omnibus ISO/IEC 9945-1: 1996
* _POSIX_C_SOURCE == 200112 1003.1-2001
* _POSIX_C_SOURCE == 200809 1003.1-2008
*
* In addition, the X/Open Portability Guide, which is now the Single UNIX
* Specification, defines a feature-test macro which indicates the version of
Expand Down Expand Up @@ -418,7 +419,11 @@

/* Deal with various X/Open Portability Guides and Single UNIX Spec. */
#ifdef _XOPEN_SOURCE
#if _XOPEN_SOURCE - 0 >= 600
#if _XOPEN_SOURCE - 0 >= 700
#define __XSI_VISIBLE 700
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200809
#elif _XOPEN_SOURCE - 0 >= 600
#define __XSI_VISIBLE 600
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200112
Expand All @@ -437,7 +442,10 @@
#define _POSIX_C_SOURCE 198808
#endif
#ifdef _POSIX_C_SOURCE
#if (_POSIX_C_SOURCE - 0) >= 200112
#if (_POSIX_C_SOURCE - 0) >= 200809
#define __POSIX_VISIBLE 200809
#define __ISO_C_VISIBLE 1999
#elif (_POSIX_C_SOURCE - 0) >= 200112
#define __POSIX_VISIBLE 200112
#define __ISO_C_VISIBLE 1999
#elif (_POSIX_C_SOURCE - 0) >= 199506
Expand Down

0 comments on commit ae2ee8e

Please sign in to comment.