5 * Copyright (c) 1998 HD Associates, Inc.
7 * contact: dufault@hda.com
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * This is a stand alone header file to set up for feature specification
35 * defined to take place before the inclusion of any standard header.
36 * It should only handle pre-processor defines.
38 * See section B.2.7 of 1003.1b-1993
44 #if !defined(KLD_MODULE)
45 #include "opt_posix.h"
48 /* Only kern_mib.c uses _POSIX_VERSION. Introduce a kernel
49 * one to avoid other pieces of the kernel getting dependant
51 * XXX Complain if you think this dumb.
54 /* Make P1003 structures visible for the kernel if
55 * the P1003_1B option is in effect.
58 #define _P1003_1B_VISIBLE
59 #ifndef _KPOSIX_VERSION
60 #define _KPOSIX_VERSION 199309L
64 #ifndef _KPOSIX_VERSION
65 #define _KPOSIX_VERSION 199009L
68 #define _P1003_1B_VISIBLE_HISTORICALLY
72 /* Default to existing user space version.
74 #ifndef _POSIX_VERSION
75 #define _POSIX_VERSION 199009L
78 /* Test for visibility of P1003.1B features:
79 * If _POSIX_SOURCE and POSIX_C_SOURCE are completely undefined
82 * If they specify a version including P1003.1B then they show up.
84 * (Two macros are added to permit hiding new extensions while
85 * keeping historic BSD features - that is not done now)
89 #if (!defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)) || \
90 (_POSIX_VERSION >= 199309L && defined(_POSIX_C_SOURCE) && \
91 _POSIX_C_SOURCE >= 199309L)
92 #define _P1003_1B_VISIBLE
93 #define _P1003_1B_VISIBLE_HISTORICALLY
97 #endif /* _SYS__POSIX_H_ */