]>
Commit | Line | Data |
---|---|---|
0c1992fb | 1 | /** @file\r |
2 | \r | |
3 | Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r | |
4 | This program and the accompanying materials are licensed and made available under\r | |
5 | the terms and conditions of the BSD License that accompanies this distribution.\r | |
6 | The full text of the license may be found at\r | |
7 | http://opensource.org/licenses/bsd-license.\r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
53e1e5c6 | 11 | \r |
53e1e5c6 | 12 | * Copyright (c) 1989, 1993\r |
13 | * The Regents of the University of California. All rights reserved.\r | |
14 | *\r | |
15 | * Redistribution and use in source and binary forms, with or without\r | |
16 | * modification, are permitted provided that the following conditions\r | |
17 | * are met:\r | |
18 | * 1. Redistributions of source code must retain the above copyright\r | |
19 | * notice, this list of conditions and the following disclaimer.\r | |
20 | * 2. Redistributions in binary form must reproduce the above copyright\r | |
21 | * notice, this list of conditions and the following disclaimer in the\r | |
22 | * documentation and/or other materials provided with the distribution.\r | |
23 | * 3. Neither the name of the University nor the names of its contributors\r | |
24 | * may be used to endorse or promote products derived from this software\r | |
25 | * without specific prior written permission.\r | |
26 | *\r | |
27 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\r | |
28 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r | |
29 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r | |
30 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\r | |
31 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r | |
32 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\r | |
33 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r | |
34 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r | |
35 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r | |
36 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r | |
37 | * SUCH DAMAGE.\r | |
38 | *\r | |
39 | * @(#)unistd.h 8.2 (Berkeley) 1/7/94\r | |
0c1992fb | 40 | NetBSD: unistd.h,v 1.35 2006/08/14 18:17:48 rpaulo Exp\r |
41 | **/\r | |
53e1e5c6 | 42 | #ifndef _SYS_UNISTD_H_\r |
43 | #define _SYS_UNISTD_H_\r | |
44 | \r | |
45 | #include <sys/featuretest.h>\r | |
46 | \r | |
47 | /* compile-time symbolic constants */\r | |
53e1e5c6 | 48 | \r |
49 | /*\r | |
50 | * According to POSIX 1003.1:\r | |
51 | * "The saved set-user-ID capability allows a program to regain the\r | |
52 | * effective user ID established at the last exec call."\r | |
53 | * However, the setuid/setgid function as specified by POSIX 1003.1 does\r | |
54 | * not allow changing the effective ID from the super-user without also\r | |
55 | * changed the saved ID, so it is impossible to get super-user privileges\r | |
56 | * back later. Instead we provide this feature independent of the current\r | |
57 | * effective ID through the seteuid/setegid function. In addition, we do\r | |
58 | * not use the saved ID as specified by POSIX 1003.1 in setuid/setgid,\r | |
59 | * because this would make it impossible for a set-user-ID executable\r | |
60 | * owned by a user other than the super-user to permanently revoke its\r | |
61 | * extra privileges.\r | |
62 | */\r | |
63 | #ifdef _NOT_AVAILABLE\r | |
64 | #define _POSIX_SAVED_IDS /* saved set-user-ID and set-group-ID */\r | |
65 | #endif\r | |
66 | \r | |
67 | #define _POSIX_VERSION 199009L\r | |
68 | #define _POSIX2_VERSION 199212L\r | |
69 | \r | |
70 | /* execution-time symbolic constants */\r | |
53e1e5c6 | 71 | /* timers */\r |
72 | #define _POSIX_TIMERS 200112L\r | |
0c1992fb | 73 | \r |
74 | /* Always ensure that these are consistent with <fcntl.h>!\r | |
75 | whence values for lseek(2).\r | |
76 | */\r | |
77 | #ifndef SEEK_SET\r | |
78 | #define SEEK_SET 0 /**< set file offset to offset */\r | |
79 | #endif\r | |
80 | #ifndef SEEK_CUR\r | |
81 | #define SEEK_CUR 1 /**< set file offset to current plus offset */\r | |
82 | #endif\r | |
83 | #ifndef SEEK_END\r | |
84 | #define SEEK_END 2 /**< set file offset to EOF plus offset */\r | |
85 | #endif\r | |
53e1e5c6 | 86 | \r |
53e1e5c6 | 87 | /* whence values for lseek(2); renamed by POSIX 1003.1 */\r |
88 | #define L_SET SEEK_SET\r | |
89 | #define L_INCR SEEK_CUR\r | |
90 | #define L_XTND SEEK_END\r | |
91 | \r | |
53e1e5c6 | 92 | /* configurable system strings */\r |
93 | #define _CS_PATH 1\r | |
94 | \r | |
95 | #endif /* !_SYS_UNISTD_H_ */\r |