diff options
author | dufault <dufault@FreeBSD.org> | 1998-03-04 10:27:00 +0000 |
---|---|---|
committer | dufault <dufault@FreeBSD.org> | 1998-03-04 10:27:00 +0000 |
commit | e28788f2a420e093ade000eeb0ba96634af0e177 (patch) | |
tree | ed01e5e208cef9b87e2f87e523c53a779b5e241b /share/man | |
parent | 8893ec06df8a340a0fd561e62ae140190cf3c832 (diff) | |
download | FreeBSD-src-e28788f2a420e093ade000eeb0ba96634af0e177.zip FreeBSD-src-e28788f2a420e093ade000eeb0ba96634af0e177.tar.gz |
Reviewed by: msmith, bde long ago
POSIX.4 headers and sysctl variables. Nothing should change
unless POSIX4 is defined or _POSIX_VERSION is set to 199309.
Diffstat (limited to 'share/man')
-rw-r--r-- | share/man/man9/Makefile | 4 | ||||
-rw-r--r-- | share/man/man9/posix4.9 | 119 |
2 files changed, 121 insertions, 2 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 0451f05..5f42ff6 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.33 1998/01/01 10:12:14 bde Exp $ +# $Id: Makefile,v 1.34 1998/01/16 18:49:42 bde Exp $ MAN9= MD5.9 \ VFS.9 VFS_FHTOVP.9 VFS_INIT.9 VFS_MOUNT.9 VFS_QUOTACTL.9 \ @@ -14,7 +14,7 @@ MAN9= MD5.9 \ at_exit.9 at_fork.9 at_shutdown.9 bios.9 boot.9 cd.9 copy.9 \ devfs_add_devswf.9 devfs_link.9 devfs_remove_dev.9 \ fetch.9 ifnet.9 inittodr.9 intro.9 kernacc.9 malloc.9 \ - mi_switch.9 panic.9 physio.9 psignal.9 \ + mi_switch.9 panic.9 physio.9 posix4.9 psignal.9 \ resettodr.9 rtalloc.9 rtentry.9 scsiconf.9 sd.9 sleep.9 spl.9 st.9 \ store.9 style.9 suser.9 time.9 timeout.9 uio.9 \ vget.9 vnode.9 vput.9 vref.9 vrele.9 vslock.9 diff --git a/share/man/man9/posix4.9 b/share/man/man9/posix4.9 new file mode 100644 index 0000000..e5256b5 --- /dev/null +++ b/share/man/man9/posix4.9 @@ -0,0 +1,119 @@ +.\" 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. +.\" +.\" $Id: posix4.9,v 1.8 1998/01/02 19:22:52 alex Exp $ +.Dd March 1, 1998 +.Dt POSIX.4 9 +.Os FreeBSD 3.0 +.Sh NAME +.Nm posix4 +.Nd "POSIX.4 extensions" +.Sh DESCRIPTION +POSIX.4 adds real time extensions and some commonly used +Berkeley extensions to POSIX.1 +This section contains information about the the +POSIX.4 extensions to the system. +.Sh STATUS +March 1, 1998 adds the header file changes to 3.0. There should be no +visible differences as long as _POSIX_VERSION is left at 199009L and +no one builds kernels with a POSIX4 option. +.Pp +If you are working with something defined in POSIX.4 then there is a good +chance we conflict. If you have the time then set +_POSIX_VERSION to 199309L in /etc/make.conf and see that your work +fits with mine. +.Pp +Since this only brings in the headers I'm only explaining the feature +test options. +.Sh SPECIFYING THE VERSION +There are three manifest constants that set the version and programming interface +for POSIX.4. +.Bd -literal -offset 0i +_POSIX_VERSION +.Ed +specifies the system for which the system is built. The default +is POSIX.1 and is 199009L. POSIX.4 is 199309L. This defines +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 +is a macro from POSIX.4 that can be defined to specify that only +POSIX and ANSI functionality from a specific POSIX version should occur +in the name space, i.e., if _POSIX_VERSION is 199309L (POSIX.4) but +_POSIX_C_SOURCE is 199009L (POSIX.1) then only POSIX.1 features should +appear. +.Sh PROPERLY HIDING EXTENSIONS +.Bd -literal -offset 0i +POSIX4_VISIBLE +.Ed +is a test macro that tries to sort out when extensions should be +visible. +.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 +by POSIX.4, it +is important to satisfy the requirements added by the +new _POSIX_C_SOURCE macro. POSIX4_VISIBLE (not a standard feature test macro) +is defined in sys/unistd.h when the combination of _POSIX_VERSION, +_POSIX_SOURCE, and _POSIX_C_SOURCE indicate the extensions are in scope. +.Pp +Since for POSIX to work you must include <unistd.h> which ultimately +sets this up header files can always assume this is visible without +including anything. +.Pp +Some traditional BSD headers (e.g., mmap.h) are now specified in POSIX.4. +This means that functionality not present in POSIX.4 should now be +hidden by testing _POSIX_SOURCE or _POSIX_C_SOURCE. The safest thing +is to hide them when _POSIX_C_SOURCE is defined and less than 199309L. +Don't bracket the extensions with the POSIX.4 feature test macros. +For example, don't conditionalize new memory locking flags with +_POSIX_MEMLOCK. It will be too easy for conflicting implementations +that don't pay heed to the POSIX.4 flags to sneak into the system. +.Sh NON STANDARD TEST MACROS +.Bd -literal -offset 0i +POSIX4_INCLUDE_MAYBES +.Ed +requests that all header files that the POSIX.4 spec says a standard +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 +POSIX4 +.Ed +is a config option and (currently) a request to build POSIX.4 by +setting the _POSIX_VERSION to 199309L in sys/unistd.h. +.Sh SEE ALSO +.Sh HISTORY +The +.Nm posix4 +section manual page appeared in +.Fx 3.0 . |