1 .\" Copyright (c) 1998 HD Associates, Inc.
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 .\" $FreeBSD: src/share/man/man9/posix4.9,v 1.5.2.5 2001/08/17 13:08:54 ru Exp $
26 .\" $DragonFly: src/share/man/man9/posix4.9,v 1.4 2006/05/26 19:39:40 swildner Exp $
32 .Nd "Posix P1003-1B extensions"
34 POSIX.1B adds real time extensions and some commonly used
35 Berkeley extensions to POSIX.1.
36 This section contains preliminary information about avoiding conflicts
37 and adding support for the required ability to specify the interface
40 March 28, 1998: _POSIX_PRIORITY_SCHEDULING works with these kernel
41 options in your configuration:
42 .Bd -literal -offset 0i
44 options "_KPOSIX_PRIORITY_SCHEDULING"
46 .Sh SPECIFYING THE VERSION
47 There are three manifest constants that set the version and programming interface
49 .Bd -literal -offset 0i
52 specifies the system for which the system is built. The default
53 is POSIX.1 and is 199009L. POSIX.1B is 199309L. This defines
54 the base features of the operating system.
55 .Bd -literal -offset 0i
58 is a macro from POSIX.1 that can
59 be defined to specify that only POSIX and ANSI functionality should occur
61 .Bd -literal -offset 0i
64 is a macro from POSIX.1B that can be defined to specify that only
65 POSIX and ANSI functionality from a specific POSIX version should occur
66 in the name space, i.e., if _POSIX_VERSION is 199309L (POSIX.1B) but
67 _POSIX_C_SOURCE is 199009L (POSIX.1) then only POSIX.1 features should
69 .Sh PROPERLY HIDING EXTENSIONS
70 The following test macros are set up in
73 used by system header files to avoid the kind of tests you see in
75 Source programs should not use these
78 implementation details and should test _POSIX_VERSION, _POSIX_SOURCE
80 These should not be used in the kernel though - the kernel should be
81 immune to the user land setting of _POSIX_VERSION. The P1003_1B option can
82 be used in the kernel to limit inclusion of new code, but make sure
83 things work properly when a POSIX.1B program is run on a kernel without
85 .Bd -literal -offset 0i
88 is a test macro that sorts out when extensions should be
89 visible. It is defined in
92 In normal C program development
93 only _POSIX_VERSION is set, permitting
96 appear to the programs. However, when adding new functionality mandated
98 is important to satisfy the requirements added by the
99 new _POSIX_C_SOURCE macro. _P1003_1B_VISIBLE (not a standard feature test macro)
102 when the combination of _POSIX_VERSION,
103 _POSIX_SOURCE, and _POSIX_C_SOURCE indicate that the extensions are in scope.
104 .Bd -literal -offset 0i
105 _P1003_1B_VISIBLE_HISTORICALLY
107 is present to conditionalize POSIX.1B extensions that were historically
108 in the system. These are visible when _POSIX_SOURCE and _POSIX_C_SOURCE
109 are not set at all or when _POSIX_C_SOURCE enables POSIX.1B features.
110 The intent of this feature test is to permit hiding the new extensions
113 extensions show up to avoid breaking existing
114 programs without trying to use the "big hammer" of _POSIX_C_SOURCE.
116 Some recent additions to header files
117 are new enough that they should be changed to
118 be dependent on _P1003_1B_VISIBLE instead of _HISTORICALLY.
122 headers (e.g., mmap.h) now specified
123 in POSIX.1B can include
127 extensions on _P1003_1B_VISIBLE_HISTORICALLY.
128 .Sh NON STANDARD TEST MACROS
129 .Bd -literal -offset 0i
130 _P1003_1B_INCLUDE_MAYBES
132 when set before the inclusion of any other header file
133 requests that all header files that the POSIX.1B spec says a standard
134 header may include should be included. Normally no non-required
135 headers are included. Setting this pre-processor definition should
136 make any compliant program compile without issues of header file
138 .Bd -literal -offset 0i
141 is a config option to build in POSIX.1B support in the kernel.
146 section manual page appeared in