/usr/include/sys/unistd.h


    1 /*
    2  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
    3  *	  All Rights Reserved
    4  *	Copyright (c) 1993, by Sun Microsystems, Inc.
    5  *
    6  *	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
    7  *	The copyright notice above does not evidence any
    8  *	actual or intended publication of such source code.
    9  */
   10 
   11 /*
   12  * Copyright (c) 1996-1998 Sun Microsystems, Inc.
   13  * All rights reserved.
   14  */
   15 
   16 /*
   17  * WARNING: This is an implementation-specific header,
   18  * its contents are not guaranteed. Applications
   19  * should include <unistd.h> and not this header.
   20  */
   21 
   22 #ifndef _SYS_UNISTD_H
   23 #define	_SYS_UNISTD_H
   24 
   25 #pragma ident	"@(#)unistd.h	1.37	98/10/28 SMI"	/* From SVR4.0 1.3 */
   26 
   27 #include <sys/feature_tests.h>
   28 
   29 #ifdef	__cplusplus
   30 extern "C" {
   31 #endif
   32 
   33 /* command names for confstr */
   34 
   35 #define	_CS_PATH			65
   36 
   37 /*
   38  * command names for large file configuration information
   39  */
   40 /* large file compilation environment configuration */
   41 #define	_CS_LFS_CFLAGS			68
   42 #define	_CS_LFS_LDFLAGS			69
   43 #define	_CS_LFS_LIBS			70
   44 #define	_CS_LFS_LINTFLAGS		71
   45 /* transitional large file interface configuration */
   46 #define	_CS_LFS64_CFLAGS		72
   47 #define	_CS_LFS64_LDFLAGS		73
   48 #define	_CS_LFS64_LIBS			74
   49 #define	_CS_LFS64_LINTFLAGS		75
   50 
   51 /* UNIX 98 */
   52 #define	_CS_XBS5_ILP32_OFF32_CFLAGS	700
   53 #define	_CS_XBS5_ILP32_OFF32_LDFLAGS	701
   54 #define	_CS_XBS5_ILP32_OFF32_LIBS	702
   55 #define	_CS_XBS5_ILP32_OFF32_LINTFLAGS	703
   56 #define	_CS_XBS5_ILP32_OFFBIG_CFLAGS	705
   57 #define	_CS_XBS5_ILP32_OFFBIG_LDFLAGS	706
   58 #define	_CS_XBS5_ILP32_OFFBIG_LIBS	707
   59 #define	_CS_XBS5_ILP32_OFFBIG_LINTFLAGS	708
   60 #define	_CS_XBS5_LP64_OFF64_CFLAGS	709
   61 #define	_CS_XBS5_LP64_OFF64_LDFLAGS	710
   62 #define	_CS_XBS5_LP64_OFF64_LIBS	711
   63 #define	_CS_XBS5_LP64_OFF64_LINTFLAGS	712
   64 #define	_CS_XBS5_LPBIG_OFFBIG_CFLAGS	713
   65 #define	_CS_XBS5_LPBIG_OFFBIG_LDFLAGS	714
   66 #define	_CS_XBS5_LPBIG_OFFBIG_LIBS	715
   67 #define	_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS	716
   68 
   69 
   70 /* command names for POSIX sysconf */
   71 
   72 /* POSIX.1 names */
   73 #define	_SC_ARG_MAX			1
   74 #define	_SC_CHILD_MAX			2
   75 #define	_SC_CLK_TCK			3
   76 #define	_SC_NGROUPS_MAX 		4
   77 #define	_SC_OPEN_MAX			5
   78 #define	_SC_JOB_CONTROL 		6
   79 #define	_SC_SAVED_IDS			7
   80 #define	_SC_VERSION			8
   81 /* SVR4 names */
   82 #define	_SC_PASS_MAX			9
   83 #define	_SC_LOGNAME_MAX			10
   84 #define	_SC_PAGESIZE			11
   85 #define	_SC_XOPEN_VERSION		12
   86 /* 13 reserved for SVr4-ES/MP _SC_NACLS_MAX */
   87 #define	_SC_NPROCESSORS_CONF		14
   88 #define	_SC_NPROCESSORS_ONLN		15
   89 #define	_SC_STREAM_MAX			16
   90 #define	_SC_TZNAME_MAX			17
   91 /* POSIX.4 names */
   92 #define	_SC_AIO_LISTIO_MAX		18
   93 #define	_SC_AIO_MAX			19
   94 #define	_SC_AIO_PRIO_DELTA_MAX		20
   95 #define	_SC_ASYNCHRONOUS_IO		21
   96 #define	_SC_DELAYTIMER_MAX		22
   97 #define	_SC_FSYNC			23
   98 #define	_SC_MAPPED_FILES		24
   99 #define	_SC_MEMLOCK			25
  100 #define	_SC_MEMLOCK_RANGE		26
  101 #define	_SC_MEMORY_PROTECTION		27
  102 #define	_SC_MESSAGE_PASSING		28
  103 #define	_SC_MQ_OPEN_MAX			29
  104 #define	_SC_MQ_PRIO_MAX			30
  105 #define	_SC_PRIORITIZED_IO		31
  106 #define	_SC_PRIORITY_SCHEDULING		32
  107 #define	_SC_REALTIME_SIGNALS		33
  108 #define	_SC_RTSIG_MAX			34
  109 #define	_SC_SEMAPHORES			35
  110 #define	_SC_SEM_NSEMS_MAX		36
  111 #define	_SC_SEM_VALUE_MAX		37
  112 #define	_SC_SHARED_MEMORY_OBJECTS	38
  113 #define	_SC_SIGQUEUE_MAX		39
  114 #define	_SC_SIGRT_MIN			40
  115 #define	_SC_SIGRT_MAX			41
  116 #define	_SC_SYNCHRONIZED_IO		42
  117 #define	_SC_TIMERS			43
  118 #define	_SC_TIMER_MAX			44
  119 /* XPG4 names */
  120 #define	_SC_2_C_BIND			45
  121 #define	_SC_2_C_DEV    			46
  122 #define	_SC_2_C_VERSION			47
  123 #define	_SC_2_FORT_DEV 			48
  124 #define	_SC_2_FORT_RUN 			49
  125 #define	_SC_2_LOCALEDEF			50
  126 #define	_SC_2_SW_DEV   			51
  127 #define	_SC_2_UPE			52
  128 #define	_SC_2_VERSION			53
  129 #define	_SC_BC_BASE_MAX			54
  130 #define	_SC_BC_DIM_MAX 			55
  131 #define	_SC_BC_SCALE_MAX		56
  132 #define	_SC_BC_STRING_MAX		57
  133 #define	_SC_COLL_WEIGHTS_MAX		58
  134 #define	_SC_EXPR_NEST_MAX		59
  135 #define	_SC_LINE_MAX 			60
  136 #define	_SC_RE_DUP_MAX			61
  137 #define	_SC_XOPEN_CRYPT			62
  138 #define	_SC_XOPEN_ENH_I18N		63
  139 #define	_SC_XOPEN_SHM			64
  140 
  141 /* additional XSH4/XCU4 command names for sysconf */
  142 #define	_SC_2_CHAR_TERM			66
  143 #define	_SC_XOPEN_XCU_VERSION		67
  144 
  145 /* additional XPG4v2 (UNIX 95) command names */
  146 #define	_SC_ATEXIT_MAX			76
  147 #define	_SC_IOV_MAX			77
  148 #define	_SC_XOPEN_UNIX			78
  149 #define	_SC_PAGE_SIZE			_SC_PAGESIZE
  150 
  151 /* defined for XTI (XNS Issue 5) */
  152 #ifndef _SC_T_IOV_MAX
  153 #define	_SC_T_IOV_MAX			79 /* Must be same in <xti.h> */
  154 #endif					   /* T_IOV_MAX must be <= IOV_MAX */
  155 
  156 #define	_SC_PHYS_PAGES			500
  157 #define	_SC_AVPHYS_PAGES		501
  158 
  159 /*
  160  * Hardware specific items
  161  * Note that not all items are supported on all architectures
  162  */
  163 #define	_SC_COHER_BLKSZ		503	/* Coherence block size */
  164 #define	_SC_SPLIT_CACHE		504	/* != 0 iff a split cache */
  165 #define	_SC_ICACHE_SZ		505	/* Instruction cache size (bytes) */
  166 #define	_SC_DCACHE_SZ		506	/* Data cache size (bytes) */
  167 #define	_SC_ICACHE_LINESZ	507	/* Instruction cache line size */
  168 #define	_SC_DCACHE_LINESZ	508	/* Data cache line size */
  169 #define	_SC_ICACHE_BLKSZ	509	/* Block size invalidated for icache */
  170 #define	_SC_DCACHE_BLKSZ	510	/* Block size for dcache */
  171 #define	_SC_DCACHE_TBLKSZ	511	/* Block size for dcache prefetch */
  172 #define	_SC_ICACHE_ASSOC	512	/* Icache associativity 1, 2, 3 etc */
  173 #define	_SC_DCACHE_ASSOC	513	/* Dcache associativity 1, 2, 3 etc */
  174 
  175 #define	_SC_MAXPID		514	/* maximum pid value */
  176 #define	_SC_STACK_PROT		515	/* default stack protection */
  177 
  178 /*
  179  * POSIX.1c (pthreads) names. These values are defined above
  180  * the sub-500 range. See psarc case 1995/257.
  181  */
  182 #define	_SC_THREAD_DESTRUCTOR_ITERATIONS 568
  183 #define	_SC_GETGR_R_SIZE_MAX		569
  184 #define	_SC_GETPW_R_SIZE_MAX		570
  185 #define	_SC_LOGIN_NAME_MAX		571
  186 #define	_SC_THREAD_KEYS_MAX		572
  187 #define	_SC_THREAD_STACK_MIN		573
  188 #define	_SC_THREAD_THREADS_MAX		574
  189 #define	_SC_TTY_NAME_MAX		575
  190 #define	_SC_THREADS			576
  191 #define	_SC_THREAD_ATTR_STACKADDR	577
  192 #define	_SC_THREAD_ATTR_STACKSIZE	578
  193 #define	_SC_THREAD_PRIORITY_SCHEDULING	579
  194 #define	_SC_THREAD_PRIO_INHERIT		580
  195 #define	_SC_THREAD_PRIO_PROTECT		581
  196 #define	_SC_THREAD_PROCESS_SHARED	582
  197 #define	_SC_THREAD_SAFE_FUNCTIONS	583
  198 
  199 /* UNIX 98 */
  200 #define	_SC_XOPEN_LEGACY		717
  201 #define	_SC_XOPEN_REALTIME		718
  202 #define	_SC_XOPEN_REALTIME_THREADS	719
  203 #define	_SC_XBS5_ILP32_OFF32		720
  204 #define	_SC_XBS5_ILP32_OFFBIG		721
  205 #define	_SC_XBS5_LP64_OFF64		722
  206 #define	_SC_XBS5_LPBIG_OFFBIG		723
  207 
  208 /* command names for POSIX pathconf */
  209 
  210 /* POSIX.1 names */
  211 #define	_PC_LINK_MAX		1
  212 #define	_PC_MAX_CANON		2
  213 #define	_PC_MAX_INPUT		3
  214 #define	_PC_NAME_MAX		4
  215 #define	_PC_PATH_MAX		5
  216 #define	_PC_PIPE_BUF		6
  217 #define	_PC_NO_TRUNC		7
  218 #define	_PC_VDISABLE		8
  219 #define	_PC_CHOWN_RESTRICTED	9
  220 /* POSIX.4 names */
  221 #define	_PC_ASYNC_IO		10
  222 #define	_PC_PRIO_IO		11
  223 #define	_PC_SYNC_IO		12
  224 
  225 /*
  226  * Large File Summit names
  227  *
  228  * This value matches the MIPS ABI choice, but leaves a large gap in the
  229  * value space.
  230  */
  231 #define	_PC_FILESIZEBITS	67
  232 #define	_PC_LAST		67
  233 
  234 #ifndef	_POSIX_VERSION
  235 #define	_POSIX_VERSION		199506L	/* Supports ISO POSIX-1c DIS */
  236 #endif
  237 
  238 #ifndef	_POSIX2_VERSION
  239 #define	_POSIX2_VERSION		199209L	/* Supports ISO POSIX-2 DIS C */
  240 #endif					/* Language binding. */
  241 
  242 #ifndef	_POSIX2_C_VERSION
  243 #define	_POSIX2_C_VERSION	199209L	/* Supports ISO POSIX-2 DIS */
  244 #endif
  245 
  246 #define	_XOPEN_XPG3			/* Supports XPG, Issue 3 */
  247 #define	_XOPEN_XPG4			/* Supports XPG, Issue 4 */
  248 #define	_XOPEN_UNIX			/* Supports XPG, Issue 4, Version 2 */
  249 
  250 #ifndef	_XOPEN_XCU_VERSION
  251 #define	_XOPEN_XCU_VERSION	4	/* Supports XCU4 */
  252 #endif
  253 
  254 #define	_XOPEN_REALTIME		1	/* Supports Realtime */
  255 #define	_XOPEN_ENH_I18N		1	/* Supports Enhanced International */
  256 #define	_XOPEN_SHM		1	/* Supports Shared Memory Feature */
  257 #define	_POSIX2_C_BIND		1	/* Supports C Language Bindings */
  258 #define	_POSIX2_CHAR_TERM	1	/* Supports at least 1 terminal type */
  259 #define	_POSIX2_LOCALEDEF	1	/* Supports creation of locales */
  260 #define	_POSIX2_C_DEV		1	/* Supports C language dev utility */
  261 #define	_POSIX2_SW_DEV		1 	/* Supports S/W Devlopement Utility */
  262 #define	_POSIX2_UPE		1 	/* Supports User Portability Utility */
  263 
  264 #ifdef	__cplusplus
  265 }
  266 #endif
  267 
  268 #endif	/* _SYS_UNISTD_H */