1.\" 2.\" Copyright (c) 2010 3.\" The DragonFly Project. All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in 13.\" the documentation and/or other materials provided with the 14.\" distribution. 15.\" 3. Neither the name of The DragonFly Project nor the names of its 16.\" contributors may be used to endorse or promote products derived 17.\" from this software without specific, prior written permission. 18.\" 19.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 22.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 23.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 24.\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, 25.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 27.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 29.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.Dd June 7, 2010 33.Dt STANDARDS 7 34.Os 35.Sh NAME 36.Nm standards 37.Nd standards supported by DragonFly 38.Sh SYNOPSIS 39.In sys/cdefs.h 40.Sh DESCRIPTION 41.Ss POSIX Standards 42The value of the 43.Dv _POSIX_C_SOURCE 44macro determines which 45.Tn POSIX 46standard the programming environment conforms to. 47.Bl -tag -width ".Li 199009" 48.It Li 1 49Make definitions conforming to 50.St -p1003.1-90 51visible. 52Implies 53.St -isoC-90 . 54.It Li 2 55Additionally, make definitions conforming to 56.St -p1003.2-92 57visible. 58.It Li 199009 59Same as 60.Li 1 . 61.It Li 199209 62Same as 63.Li 2 . 64.It Li 199309 65Additionally, make definitions conforming to 66.St -p1003.1b-93 67visible. 68.It Li 199506 69Additionally, make definitions conforming to 70.St -p1003.1c-95 71visible. 72.It Li 200112 73Additionally, make definitions conforming to 74.St -p1003.1-2001 75visible. 76Implies 77.St -isoC-99 . 78This is the default. 79.El 80.Pp 81Defining 82.Dv _POSIX_C_SOURCE 83to any value lower than 84.Li 199009 85(other than 86.Li 1 87or 88.Li 2 ) 89makes it default to 90.Li 198808 91which makes definitions conforming to 92.St -p1003.1-88 93visible. 94No C standard is implied in this case. 95.Pp 96Defining the obsolete 97.Dv _POSIX_SOURCE 98macro without defining 99.Dv _POSIX_C_SOURCE 100is equivalent to defining 101.Dv _POSIX_C_SOURCE 102to 103.Li 198808 . 104.Ss X/Open CAE Specifications 105The value of the 106.Dv _XOPEN_SOURCE 107macro determines which X/Open CAE specification the programming 108environment conforms to. 109.Bl -tag -width ".Li 500" 110.It Li 500 111Make defintions conforming to the 112.St -susv2 113visible. 114Implies defining 115.Dv _POSIX_C_SOURCE 116to 117.Li 199506 . 118.It Li 600 119Make definitions conforming to the 120.St -susv3 121visible. 122Implies defining 123.Dv _POSIX_C_SOURCE 124to 125.Li 200112 . 126This is the default. 127.El 128.Pp 129If both CAE and POSIX conformance is required, only 130.Dv _XOPEN_SOURCE 131can be set. 132.\".Ss Miscellaneous Macros 133.\".Dv _ANSI_SOURCE 134.\".Dv _C99_SOURCE 135.\".Dv _DRAGONFLY_SOURCE 136.\".Dv _NETBSD_SOURCE 137.Sh HISTORY 138A 139.Nm 140manual page first appeared in 141.Dx 2.7 . 142