diff options
author | dufault <dufault@FreeBSD.org> | 1998-03-08 17:25:38 +0000 |
---|---|---|
committer | dufault <dufault@FreeBSD.org> | 1998-03-08 17:25:38 +0000 |
commit | d3dd91fcbc3fdd38db7fa5e2a844a103e8090a00 (patch) | |
tree | 01a8747d7362e70e0f5e23b70dbcda75cf6092e8 /sys/sys/unistd.h | |
parent | 84b7fbfa292269f69d459cbb4ecf1c921bb167c3 (diff) | |
download | FreeBSD-src-d3dd91fcbc3fdd38db7fa5e2a844a103e8090a00.zip FreeBSD-src-d3dd91fcbc3fdd38db7fa5e2a844a103e8090a00.tar.gz |
Reviewed by: bde
Changes to support building with _POSIX_SOURCE set to 199309L:
1. Add sys/_posix.h to handle those preprocessor defs that POSIX
says have effects when defined before including any header files;
2. Change POSIX4_VISIBLE back to _POSIX4_VISIBLE
3. Add _POSIX4_VISIBLE_HISTORICALLY for pre-existing BSD features now
defined in POSIX. These show up when:
_POSIX_SOURCE and _POSIX_C_SOURCE are not set or
_POSIX_C_SOURCE is set >= 199309L
and vanish when:
_POSIX_SOURCE is set or _POSIX_C_SOURCE is < 199309L.
4. Explain these in man 9 posix4;
5. Include _posix.h and conditionalize on new feature test.
Diffstat (limited to 'sys/sys/unistd.h')
-rw-r--r-- | sys/sys/unistd.h | 45 |
1 files changed, 5 insertions, 40 deletions
diff --git a/sys/sys/unistd.h b/sys/sys/unistd.h index e31a7d3..9ac2c03 100644 --- a/sys/sys/unistd.h +++ b/sys/sys/unistd.h @@ -31,12 +31,14 @@ * SUCH DAMAGE. * * @(#)unistd.h 8.2 (Berkeley) 1/7/94 - * $Id: unistd.h,v 1.14 1997/06/16 00:29:26 dyson Exp $ + * $Id: unistd.h,v 1.15 1998/03/04 10:26:46 dufault Exp $ */ #ifndef _SYS_UNISTD_H_ #define _SYS_UNISTD_H_ +#include <sys/_posix.h> + /* compile-time symbolic constants */ #define _POSIX_JOB_CONTROL /* implementation supports job control */ @@ -50,47 +52,10 @@ #define _POSIX_SAVED_IDS /* saved set-user-ID and set-group-ID */ #endif -#ifdef POSIX4 - -/* Select POSIX.4 regardless. - * Don't undef first - we want an error on conflicts. - */ - -#define _POSIX_VERSION 199309L -#endif - -#ifndef _POSIX_VERSION -#define _POSIX_VERSION 199009L -#endif - -#if _POSIX_VERSION > 199009L -/* - * Set it up so that all new headers can assume _POSIX_C_SOURCE is the - * only thing that must be looked at to determine the feature set, - * and so that old headers don't have to change: - */ -#if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) -/* - * Default to latest: - */ -#define _POSIX_C_SOURCE _POSIX_VERSION -#endif - -#if defined(_POSIX_C_SOURCE) && !defined(_POSIX_SOURCE) -/* - * Define _POSIX_SOURCE for older headers: - */ -#define _POSIX_SOURCE -#endif - #if _POSIX_VERSION >= 199309L #include <posix4/posix4.h> #endif -#endif /* _POSIX_VERSION */ - - - #define _POSIX2_VERSION 199212L /* execution-time symbolic constants */ @@ -162,7 +127,7 @@ /* configurable system strings */ #define _CS_PATH 1 -#ifdef POSIX4_VISIBLE +#ifdef _POSIX4_VISIBLE #if 0 /* Not until the dust settles after the header commit @@ -205,7 +170,7 @@ #define _PC_PRIO_IO 54 #define _PC_SYNC_IO 55 -#endif /* POSIX4_VISIBLE */ +#endif /* _POSIX4_VISIBLE */ #ifndef _POSIX_SOURCE /* |