1 /* $OpenBSD: unistd.h,v 1.12 2004/05/07 18:39:19 millert Exp $ */ 2 /* $NetBSD: unistd.h,v 1.10 1994/06/29 06:46:06 cgd Exp $ */ 3 4 /* 5 * Copyright (c) 1989, 1993 6 * The Regents of the University of California. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: 11 * 1. Redistributions of source code must retain the above copyright 12 * notice, this list of conditions and the following disclaimer. 13 * 2. Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in the 15 * documentation and/or other materials provided with the distribution. 16 * 3. Neither the name of the University nor the names of its contributors 17 * may be used to endorse or promote products derived from this software 18 * without specific prior written permission. 19 * 20 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * @(#)unistd.h 8.2 (Berkeley) 1/7/94 33 */ 34 35 #ifndef _SYS_UNISTD_H_ 36 #define _SYS_UNISTD_H_ 37 38 /* compile-time symbolic constants */ 39 #define _POSIX_JOB_CONTROL /* implementation supports job control */ 40 41 #define _POSIX_SAVED_IDS /* saved set-user-ID and set-group-ID */ 42 43 #define _POSIX_VERSION 199009L 44 #define _POSIX2_VERSION 199212L 45 46 /* execution-time symbolic constants */ 47 /* chown requires appropriate privileges */ 48 #define _POSIX_CHOWN_RESTRICTED 1 49 /* too-long path components generate errors */ 50 #define _POSIX_NO_TRUNC 1 51 /* may disable terminal special characters */ 52 #define _POSIX_VDISABLE (0377) 53 /* file synchronization is available */ 54 #define _POSIX_FSYNC 1 55 56 /* access function */ 57 #define F_OK 0 /* test for existence of file */ 58 #define X_OK 0x01 /* test for execute or search permission */ 59 #define W_OK 0x02 /* test for write permission */ 60 #define R_OK 0x04 /* test for read permission */ 61 62 /* whence values for lseek(2) */ 63 #define SEEK_SET 0 /* set file offset to offset */ 64 #define SEEK_CUR 1 /* set file offset to current plus offset */ 65 #define SEEK_END 2 /* set file offset to EOF plus offset */ 66 67 #ifndef _POSIX_SOURCE 68 /* old BSD whence values for lseek(2); renamed by POSIX 1003.1 */ 69 #define L_SET SEEK_SET 70 #define L_INCR SEEK_CUR 71 #define L_XTND SEEK_END 72 #endif 73 74 /* configurable pathname variables */ 75 #define _PC_LINK_MAX 1 76 #define _PC_MAX_CANON 2 77 #define _PC_MAX_INPUT 3 78 #define _PC_NAME_MAX 4 79 #define _PC_PATH_MAX 5 80 #define _PC_PIPE_BUF 6 81 #define _PC_CHOWN_RESTRICTED 7 82 #define _PC_NO_TRUNC 8 83 #define _PC_VDISABLE 9 84 85 /* configurable system variables */ 86 #define _SC_ARG_MAX 1 87 #define _SC_CHILD_MAX 2 88 #define _SC_CLK_TCK 3 89 #define _SC_NGROUPS_MAX 4 90 #define _SC_OPEN_MAX 5 91 #define _SC_JOB_CONTROL 6 92 #define _SC_SAVED_IDS 7 93 #define _SC_VERSION 8 94 #define _SC_BC_BASE_MAX 9 95 #define _SC_BC_DIM_MAX 10 96 #define _SC_BC_SCALE_MAX 11 97 #define _SC_BC_STRING_MAX 12 98 #define _SC_COLL_WEIGHTS_MAX 13 99 #define _SC_EXPR_NEST_MAX 14 100 #define _SC_LINE_MAX 15 101 #define _SC_RE_DUP_MAX 16 102 #define _SC_2_VERSION 17 103 #define _SC_2_C_BIND 18 104 #define _SC_2_C_DEV 19 105 #define _SC_2_CHAR_TERM 20 106 #define _SC_2_FORT_DEV 21 107 #define _SC_2_FORT_RUN 22 108 #define _SC_2_LOCALEDEF 23 109 #define _SC_2_SW_DEV 24 110 #define _SC_2_UPE 25 111 #define _SC_STREAM_MAX 26 112 #define _SC_TZNAME_MAX 27 113 #define _SC_PAGESIZE 28 114 #define _SC_PAGE_SIZE _SC_PAGESIZE /* 1170 compatibility */ 115 #define _SC_FSYNC 29 116 #define _SC_XOPEN_SHM 30 117 #define _SC_SEM_NSEMS_MAX 31 118 #define _SC_SEM_VALUE_MAX 32 119 120 /* P1003.1c */ 121 #define _SC_GETGR_R_SIZE_MAX 33 122 #define _SC_GETPW_R_SIZE_MAX 34 123 124 #ifdef notyet 125 #define _SC_LOGIN_NAME_MAX 126 #define _SC_THREAD_DESTRUCTOR_ITERATIONS 127 #define _SC_THREAD_KEYS_MAX 128 #define _SC_THREAD_STACK_MIN 129 #define _SC_THREAD_THREADS_MAX 130 #define _SC_TTY_NAME_MAX 131 #define _SC_THREADS 132 #define _SC_THREAD_ATTR_STACKADDR 133 #define _SC_THREAD_ATTR_STACKSIZE 134 #define _SC_THREAD_PRIORITY_SCHEDULING 135 #define _SC_THREAD_PRIO_INHERIT 136 #define _SC_THREAD_PRIO_PROTECT 137 #define _SC_THREAD_PROCESS_SHARED 138 #define _SC_THREAD_SAFE_FUNCTIONS 139 #endif 140 141 /* configurable system strings */ 142 #define _CS_PATH 1 143 144 #endif /* !_SYS_UNISTD_H_ */ 145