1998-03-04 10:27:00 +00:00
|
|
|
.\" Copyright (c) 1998 HD Associates, Inc.
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
1998-03-28 11:51:01 +00:00
|
|
|
.\" $Id: posix1b.9,v 1.2 1998/03/08 17:25:01 dufault Exp $
|
1998-03-04 10:27:00 +00:00
|
|
|
.Dd March 1, 1998
|
1998-03-28 11:51:01 +00:00
|
|
|
.Dt POSIX.1B 9
|
1998-03-04 10:27:00 +00:00
|
|
|
.Os FreeBSD 3.0
|
|
|
|
.Sh NAME
|
1998-03-28 11:51:01 +00:00
|
|
|
.Nm posix1b
|
|
|
|
.Nd "Posix P1003-1B extensions"
|
1998-03-04 10:27:00 +00:00
|
|
|
.Sh DESCRIPTION
|
1998-03-28 11:51:01 +00:00
|
|
|
POSIX.1B adds real time extensions and some commonly used
|
1998-03-04 10:27:00 +00:00
|
|
|
Berkeley extensions to POSIX.1
|
1998-03-08 17:25:38 +00:00
|
|
|
This section contains preliminary information about avoiding conflicts
|
|
|
|
and adding support for the required ability to specify the interface
|
|
|
|
version.
|
1998-03-04 10:27:00 +00:00
|
|
|
.Sh STATUS
|
1998-03-28 11:51:01 +00:00
|
|
|
March 28, 1998: _POSIX_PRIORITY_SCHEDULING works with these kernel
|
|
|
|
options in your configuration:
|
|
|
|
.Bd -literal -offset 0i
|
|
|
|
options "P1003_1B"
|
|
|
|
options "_KPOSIX_PRIORITY_SCHEDULING"
|
|
|
|
.Ed
|
1998-03-04 10:27:00 +00:00
|
|
|
.Sh SPECIFYING THE VERSION
|
|
|
|
There are three manifest constants that set the version and programming interface
|
1998-03-28 11:51:01 +00:00
|
|
|
for POSIX.1B.
|
1998-03-04 10:27:00 +00:00
|
|
|
.Bd -literal -offset 0i
|
|
|
|
_POSIX_VERSION
|
|
|
|
.Ed
|
|
|
|
specifies the system for which the system is built. The default
|
1998-03-28 11:51:01 +00:00
|
|
|
is POSIX.1 and is 199009L. POSIX.1B is 199309L. This defines
|
1998-03-04 10:27:00 +00:00
|
|
|
the base features of the operating system.
|
|
|
|
.Bd -literal -offset 0i
|
|
|
|
_POSIX_SOURCE
|
|
|
|
.Ed
|
|
|
|
is a macro from POSIX.1 that can
|
|
|
|
be defined to specify that only POSIX and ANSI functionality should occur
|
|
|
|
in the name space.
|
|
|
|
.Bd -literal -offset 0i
|
|
|
|
_POSIX_C_SOURCE
|
|
|
|
.Ed
|
1998-03-28 11:51:01 +00:00
|
|
|
is a macro from POSIX.1B that can be defined to specify that only
|
1998-03-04 10:27:00 +00:00
|
|
|
POSIX and ANSI functionality from a specific POSIX version should occur
|
1998-03-28 11:51:01 +00:00
|
|
|
in the name space, i.e., if _POSIX_VERSION is 199309L (POSIX.1B) but
|
1998-03-04 10:27:00 +00:00
|
|
|
_POSIX_C_SOURCE is 199009L (POSIX.1) then only POSIX.1 features should
|
|
|
|
appear.
|
|
|
|
.Sh PROPERLY HIDING EXTENSIONS
|
1998-03-08 17:25:38 +00:00
|
|
|
The following test macros are set up in <sys/_posix.h>. They should
|
|
|
|
used by system header files to avoid the kind of tests you see in
|
|
|
|
<sys/_posix.h>. Source programs should not use these FreeBSD specific
|
1998-03-28 11:51:01 +00:00
|
|
|
implementation details and should test _POSIX_VERSION, _POSIX_SOURCE
|
|
|
|
and _POSIX_C_SOURCE.
|
|
|
|
These should not be used in the kernel though - the kernel should be
|
|
|
|
immune to the user land setting of _POSIX_VERSION. The P1003_1B option can
|
1998-03-08 17:25:38 +00:00
|
|
|
be used in the kernel to limit inclusion of new code, but make sure
|
1998-03-28 11:51:01 +00:00
|
|
|
things work properly when a POSIX.1B program is run on a kernel without
|
|
|
|
the P1003_1B option.
|
1998-03-04 10:27:00 +00:00
|
|
|
.Bd -literal -offset 0i
|
1998-03-28 11:51:01 +00:00
|
|
|
_P1003_1B_VISIBLE
|
1998-03-04 10:27:00 +00:00
|
|
|
.Ed
|
1998-03-08 17:25:38 +00:00
|
|
|
is a test macro that sorts out when extensions should be
|
|
|
|
visible. It is defined in <sys/_posix.h>.
|
1998-03-04 10:27:00 +00:00
|
|
|
.Pp
|
|
|
|
In normal C program development
|
|
|
|
only _POSIX_VERSION is set, permitting BSD extensions to
|
|
|
|
appear to the programs. However, when adding new functionality mandated
|
1998-03-28 11:51:01 +00:00
|
|
|
by POSIX.1B, it
|
1998-03-04 10:27:00 +00:00
|
|
|
is important to satisfy the requirements added by the
|
1998-03-28 11:51:01 +00:00
|
|
|
new _POSIX_C_SOURCE macro. _P1003_1B_VISIBLE (not a standard feature test macro)
|
1998-03-04 10:27:00 +00:00
|
|
|
is defined in sys/unistd.h when the combination of _POSIX_VERSION,
|
1998-03-08 17:25:38 +00:00
|
|
|
_POSIX_SOURCE, and _POSIX_C_SOURCE indicate that the extensions are in scope.
|
|
|
|
.Bd -literal -offset 0i
|
1998-03-28 11:51:01 +00:00
|
|
|
_P1003_1B_VISIBLE_HISTORICALLY
|
|
|
|
is present to conditionalize POSIX.1B extensions that were historically
|
1998-03-08 17:25:38 +00:00
|
|
|
in the system. These are visible when _POSIX_SOURCE and _POSIX_C_SOURCE
|
1998-03-28 11:51:01 +00:00
|
|
|
are not set at all or when _POSIX_C_SOURCE enables POSIX.1B features.
|
|
|
|
The intent of this feature test is to permit hiding the new extensions
|
|
|
|
while still letting BSD extensions show up to avoid breaking existing
|
|
|
|
programs without trying to use the "big hammer" of _POSIX_C_SOURCE.
|
1998-03-04 10:27:00 +00:00
|
|
|
.Pp
|
1998-03-28 11:51:01 +00:00
|
|
|
Some recent additions to header files
|
|
|
|
are new enough that they should be changed to
|
|
|
|
be dependent on _P1003_1B_VISIBLE instead of _HISTORICALLY.
|
1998-03-04 10:27:00 +00:00
|
|
|
.Pp
|
1998-03-28 11:51:01 +00:00
|
|
|
Traditional BSD headers (e.g., mmap.h) now specified
|
|
|
|
in POSIX.1B can include <sys/_posix.h> and conditionalize
|
|
|
|
BSD extensions on _P1003_1B_VISIBLE_HISTORICALLY.
|
1998-03-04 10:27:00 +00:00
|
|
|
.Sh NON STANDARD TEST MACROS
|
|
|
|
.Bd -literal -offset 0i
|
1998-03-28 11:51:01 +00:00
|
|
|
_P1003_1B_INCLUDE_MAYBES
|
1998-03-04 10:27:00 +00:00
|
|
|
.Ed
|
1998-03-08 17:25:38 +00:00
|
|
|
when set before the inclusion of any other header file
|
1998-03-28 11:51:01 +00:00
|
|
|
requests that all header files that the POSIX.1B spec says a standard
|
1998-03-04 10:27:00 +00:00
|
|
|
header may include should be included. Normally no non-required
|
|
|
|
headers are included. Setting this pre-processor definition should
|
|
|
|
make any compliant program compile without issues of header file
|
|
|
|
inclusion.
|
|
|
|
.Bd -literal -offset 0i
|
1998-03-28 11:51:01 +00:00
|
|
|
P1003_1B
|
1998-03-04 10:27:00 +00:00
|
|
|
.Ed
|
1998-03-28 11:51:01 +00:00
|
|
|
is a config option to build in POSIX.1B support in the kernel.
|
1998-03-04 10:27:00 +00:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
1998-03-28 11:51:01 +00:00
|
|
|
.Nm posix1b
|
1998-03-04 10:27:00 +00:00
|
|
|
section manual page appeared in
|
|
|
|
.Fx 3.0 .
|