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