2 # posix { getconf limits } macro table
4 # @(#)conf.tab (AT&T Research) 2008-01-31
6 # name standard section call flags [ header ... ] [ value ... ]
9 # standard: AST, C, POSIX, SVID, XOPEN, <vendor> { SCO, SGI, SUN, ... }
10 # section: section number in standard
11 # call: CS=confstr PC=pathconf SC=sysconf SI=sysinfo QQ=query XX=none
13 # C defer call to native getconf(1)
14 # D defer minmax to native getconf(1)
17 # M has _<standard><section>_<name> minmax value
19 # O use original name and definition
20 # R _<standard>_<call>_<section>_<name>
21 # S _<call>_<standard><section>_<name>
22 # U <standard><section>_<name> prefixed by underscore
23 # V _ prefix not allowed
25 # X define even if native is dynamic (ast special)
27 # default names if <section> <= 1
32 # default names if <section> > 1
34 # _<call>_<section>_<name>
35 # <standard><section>_<name>
37 # the [NSU] flags modify the default names
40 ABI_AIO_XFER_MAX C QQ 1 L
41 ABI_ASYNCHRONOUS_IO C QQ 1 L
43 ADVISORY_INFO POSIX SC 1 FUW
44 AIO_LISTIO_MAX POSIX SC 1 LMU 2
45 AIO_MAX POSIX SC 1 LMU 1
46 AIO_PRIO_DELTA_MAX POSIX SC 1 LMU
47 ALLOC_SIZE_MIN POSIX PC 1 LUVW
48 ARCHITECTURE SVID SI 1 O
49 ARG_MAX POSIX SC 1 CDLMUX NCARGS 4096
50 ASYNCHRONOUS_IO POSIX SC 1 CDFUW
51 ASYNC_IO POSIX PC 1 FUW
52 ATEXIT_MAX XOPEN SC 1 LMU 32
54 AVAIL_PROCESSORS C QQ 1 L
55 AVPHYS_PAGES SUN SC 1 0
56 BARRIERS POSIX SC 1 FUW
57 BC_BASE_MAX POSIX SC 2 LMN 99
58 BC_DIM_MAX POSIX SC 2 LMN 2048
59 BC_SCALE_MAX POSIX SC 2 LMN 99
60 BC_STRING_MAX POSIX SC 2 LMN 1000
62 CHARCLASS_NAME_MAX XOPEN XX 1 L 14
66 CHAR_TERM POSIX SC 2 FUW
67 CHILD_MAX POSIX SC 1 CDLMUX 6 cc{
69 #define child() fork()
72 #define spawnve _map_spawnve
74 extern int spawnve(const char*, char* const[], char* const[]);
75 static char* cmd[] = { "/bin/echo", 0 };
76 #define child() spawnve(cmd[0],cmd,(char**)0)
82 for (i = 3; i < 512 && (n = child()) >= 0; i++)
84 while (wait((int*)0) > 0);
85 for (n = 8; n < i; n <<= 1);
90 CHOWN_RESTRICTED POSIX PC 1 FUW
92 CLK_TCK POSIX SC 1 L HZ 60
93 CLOCKRES_MIN POSIX SC 1 MUW 1
94 CLOCKS_PER_SEC C QQ 1 L
95 CLOCK_SELECTION POSIX SC 1 FUVW
96 COLL_WEIGHTS_MAX POSIX SC 2 DLMN 2
97 CPUTIME POSIX SC 1 FUW
100 CRYPT XOPEN SC 1 FSUW
101 C_BIND POSIX SC 2 CFU
103 C_VERSION POSIX SC 2 CDFU
104 DATAKEYS_MAX C QQ 1 0
105 DELAYTIMER_MAX POSIX SC 1 LMU 32
106 ENH_I18N XOPEN SC 1 FSUW
107 EQUIV_CLASS_MAX C QQ 1 L
108 EXEC_INTERPRETER_LENGTH C QQ 1 L
109 EXPR_NEST_MAX POSIX SC 2 LMN 32
110 FCHR_MAX SVID SC 1 LMU LONG_MAX 2147483647
111 FILESIZEBITS POSIX PC 1 LMU (8*sizeof(off_t)) 32
112 FILE_LOCKING POSIX SC 1 FU
113 FORT_DEV POSIX SC 2 CFUW
114 FORT_RUN POSIX SC 2 CFUW
115 FSYNC POSIX SC 1 CDFUW _lib_fsync
116 GETGR_R_SIZE_MAX C QQ 1 L
117 GETPW_R_SIZE_MAX C QQ 1 L
120 HOST_NAME_MAX POSIX SC 1 LMU 255
121 HW_PROVIDER SVID SI 1 O
123 ILP32_OFF32 XBS5 SC 1 FU
124 ILP32_OFF32_CFLAGS XBS5 CS 1 FU
125 ILP32_OFF32_LDFLAGS XBS5 CS 1 FU
126 ILP32_OFF32_LIBS XBS5 CS 1 FU
127 ILP32_OFF32_LINTFLAGS XBS5 CS 1 FU
128 ILP32_OFFBIG XBS5 SC 1 FU
129 ILP32_OFFBIG_CFLAGS XBS5 CS 1 FU
130 ILP32_OFFBIG_LDFLAGS XBS5 CS 1 FU
131 ILP32_OFFBIG_LIBS XBS5 CS 1 FU
132 ILP32_OFFBIG_LINTFLAGS XBS5 CS 1 FU
133 INITTAB_NAME SVID SI 1 O
134 INT_MAX C XX 1 L 32767
135 INT_MIN C XX 1 L -32767
136 IOV_MAX XOPEN SC 1 LMU 16
140 JOB_CONTROL POSIX SC 1 FUW cc{
141 #include "FEATURE/wait"
150 KERNEL_CLIST SCO SC 1 0
151 KERNEL_CLIST_MAX SCO SC 1 0
152 KERNEL_DISK SCO SC 1 0
153 KERNEL_DISK_MAX SCO SC 1 0
154 KERNEL_DMABUF SCO SC 1 0
155 KERNEL_DMABUF_MAX SCO SC 1 0
156 KERNEL_FILE SCO SC 1 0
157 KERNEL_FILE_MAX SCO SC 1 0
158 KERNEL_FLCKREC SCO SC 1 0
159 KERNEL_FLCKREC_MAX SCO SC 1 0
160 KERNEL_INODE SCO SC 1 0
161 KERNEL_INODE_MAX SCO SC 1 0
162 KERNEL_MOUNT SCO SC 1 0
163 KERNEL_MOUNT_MAX SCO SC 1 0
164 KERNEL_PINODE SCO SC 1 0
165 KERNEL_PINODE_MAX SCO SC 1 0
166 KERNEL_PROC SCO SC 1 0
167 KERNEL_PROC_MAX SCO SC 1 0
168 KERNEL_REGION SCO SC 1 0
169 KERNEL_REGION_MAX SCO SC 1 0
170 KERNEL_S5INODE SCO SC 1 0
171 KERNEL_S5INODE_MAX SCO SC 1 0
172 KERNEL_STAMP SVID SI 1 O
173 KERN_POINTERS C QQ 1 L
176 LFS_CFLAGS POSIX CS 1 MU cc{ -D_LARGEFILE_SOURCE "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" -D_LARGEFILE64_SOURCE -64
177 #include <sys/types.h>
181 if (sizeof(off_t) >= sizeof(off_64_t))
189 LFS64_CFLAGS POSIX CS 1 MU : LFS_CFLAGS
190 LFS64_LDFLAGS POSIX CS 1 MU : LFS_CFLAGS
191 LFS64_LIBS POSIX CS 1 MU
192 LFS64_LINTFLAGS POSIX CS 1 MU : LFS_CFLAGS
193 LFS_LDFLAGS POSIX CS 1 MU : LFS_CFLAGS
194 LFS_LIBS POSIX CS 1 MU
195 LFS_LINTFLAGS POSIX CS 1 MU : LFS_CFLAGS
196 LINE_MAX POSIX SC 2 LMN 2048
197 LINK_MAX POSIX PC 1 LMU MAXLINK SHRT_MAX 8
200 LOCALEDEF POSIX SC 1 FUW
201 LOCALEDEF POSIX SC 2 CFUW
202 LOGIN_NAME_MAX POSIX SC 1 LMU
203 LOGNAME_MAX SVID SC 1 MU 8
204 LONG_BIT XOPEN XX 1 L (8*sizeof(long)) 32
205 LONG_MAX C XX 1 L 2147483647
206 LONG_MIN C XX 1 L -2147483647
207 LP64_OFF64 XBS5 SC 1 FU
208 LP64_OFF64_CFLAGS XBS5 CS 1 FU
209 LP64_OFF64_LDFLAGS XBS5 CS 1 FU
210 LP64_OFF64_LIBS XBS5 CS 1 FU
211 LP64_OFF64_LINTFLAGS XBS5 CS 1 FU
212 LPBIG_OFFBIG XBS5 SC 1 FU
213 LPBIG_OFFBIG_CFLAGS XBS5 CS 1 FU
214 LPBIG_OFFBIG_LDFLAGS XBS5 CS 1 FU
215 LPBIG_OFFBIG_LIBS XBS5 CS 1 FU
216 LPBIG_OFFBIG_LINTFLAGS XBS5 CS 1 FU
218 MAPPED_FILES POSIX SC 1 CDFUW _lib_mmap
219 MAX_CANON POSIX PC 1 LMU CANBSIZ 255
220 MAX_INPUT POSIX PC 1 LMU MAX_CANON 255
221 MB_LEN_MAX C XX 1 L 1
223 MEMLOCK POSIX SC 1 CDFUW
224 MEMLOCK_RANGE POSIX SC 1 CDFUW
225 MEMORY_PROTECTION POSIX SC 1 CDFUW
226 MESSAGE_PASSING POSIX SC 1 CDFUW
227 MMAP_FIXED_ALIGNMENT C QQ 1 L _AST_PAGESIZE
228 MONOTONIC_CLOCK POSIX SC 1 FUW
229 MQ_OPEN_MAX POSIX SC 1 LMU 8
230 MQ_PRIO_MAX POSIX SC 1 LMU 32
232 MULTI_PROCESS POSIX SC 1 FU
233 NACLS_MAX SVID SC 1 0
234 NAME_MAX POSIX PC 1 LMU 14 cc{
238 printf("%d", MAXNAMLEN);
240 #if !defined(remove) && (!_lib_remove || _lib_unlink)
241 #define remove unlink
247 for (i = 0; i < sizeof(name); i++)
250 name[sizeof(name) - 1] = 0;
251 if ((n = creat(name, 0666)) >= 0)
254 for (v = 12; v < sizeof(name); v++)
257 if (remove(name) >= 0) break;
261 else for (v = 12; v < sizeof(name); v++)
264 if ((n = creat(name, 0666)) >= 0)
281 NGROUPS_MAX POSIX SC 1 CDLMU 8 cc{
287 if ((n = getgroups(0, &g)) < 0)
288 #if defined(NGROUPS) && (NGROUPS-0) > 0
298 NL_ARGMAX XOPEN XX 1 L 9
299 NL_LANGMAX XOPEN XX 1 L 14
301 NL_MSGMAX XOPEN XX 1 L 32767
302 NL_NMAX XOPEN XX 1 L 1
303 NL_SETMAX XOPEN XX 1 L 255
305 NL_TEXTMAX XOPEN XX 1 L LINE_MAX
306 NO_TRUNC POSIX PC 1 FUW
307 NPROCESSORS_CONF SVID SC 1 0
308 NPROCESSORS_MAX SVID SC 1 0
309 NPROCESSORS_ONLN SVID SC 1 0
312 NSS_BUFLEN_GROUP C QQ 1 L
313 NSS_BUFLEN_PASSWD C QQ 1 L
314 NUM_PROCESSORS C QQ 1 L
315 NZERO XOPEN XX 1 L 20
316 OPEN_MAX POSIX SC 1 CDLMUX 16 cc{
317 #if _lib_getdtablesize
318 extern int getdtablesize(void);
321 printf("%d", getdtablesize());
332 while ((i = dup(0)) >= 0)
337 while (n <= v) close(n++);
343 OPEN_MAX_CEIL AST XX 1 L OPEN_MAX
348 OS_PROVIDER SVID SI 1 O
349 OS_VERSION AES SC 1 FSU
350 PAGESIZE POSIX SC 1 MU PAGESIZE PAGE_SIZE 4096 cc{
354 printf("%ld", 64*1024L);
359 extern size_t getpagesize(void);
361 printf("%d", getpagesize());
369 PAGE_SIZE POSIX SC 1 MU _AST_PAGESIZE
370 PASS_MAX SVID SC 1 CDLMU 8
371 PATH POSIX CS 1 CMU "/bin:/usr/bin"
372 PATH_MAX POSIX PC 1 CDLMUX MAXPATHLEN 1024
374 PBS_ACCOUNTING POSIX SC 2 FUW
375 PBS_CHECKPOINT POSIX SC 2 FUW
376 PBS_LOCATE POSIX SC 2 FUW
377 PBS_MESSAGE POSIX SC 2 FUW
378 PBS_TRACK POSIX SC 2 FUW
379 PHYS_PAGES SUN SC 1 0
380 PID_MAX SVID SC 1 LMU 30000 cc{
386 if ((fd = open("/proc/sys/kernel/pid_max", O_RDONLY)) < 0)
388 if ((n = read(fd, buf, sizeof(buf)-1)) < 2)
391 n = (int)strtol(buf, (char**)0, 0);
397 PII_INTERNET POSIX SC 1 FU
398 PII_INTERNET_DGRAM POSIX SC 1 FU
399 PII_INTERNET_STREAM POSIX SC 1 FU
400 PII_OSI POSIX SC 1 FU
401 PII_OSI_CLTS POSIX SC 1 FU
402 PII_OSI_COTS POSIX SC 1 FU
403 PII_OSI_M POSIX SC 1 FU
404 PII_SOCKET POSIX SC 1 FU
405 PII_XTI POSIX SC 1 FU
406 PIPE_BUF POSIX PC 1 LMU 512
408 PRIORITIZED_IO POSIX SC 1 FUW
409 PRIORITY_SCHEDULING POSIX SC 1 CDFUW
410 PRIO_IO POSIX PC 1 FUW
411 PROC_RSRC_MGR C QQ 1 L
412 PTHREAD_DESTRUCTOR_ITERATIONS C QQ 1 L
413 PTHREAD_KEYS_MAX C QQ 1 L
414 PTHREAD_STACK_MIN C QQ 1 L
415 PTHREAD_THREADS_MAX C QQ 1 L
416 PTRDIFF_MAX C XX 1 LMU stdint.h 65535
417 PTRDIFF_MIN C XX 1 LMU stdint.h -65535
418 RAW_SOCKETS POSIX SC 1 FUW
419 READER_WRITER_LOCKS POSIX SC 1 FUW
420 REALTIME XOPEN SC 1 FU
421 REALTIME_SIGNALS POSIX SC 1 CDFUW
422 REALTIME_THREADS XOPEN SC 1 FU
423 REC_INCR_XFER_SIZE POSIX PC 1 LVW
424 REC_MAX_XFER_SIZE POSIX PC 1 LVW
425 REC_MIN_XFER_SIZE POSIX PC 1 LVW
426 REC_XFER_ALIGN POSIX PC 1 LVW
427 REENTRANT_FUNCTIONS POSIX SC 1 FU
428 REGEXP POSIX SC 1 FUW
429 REGEX_VERSION POSIX SC 1 F 20030916
431 RESOURCE_LIMITS POSIX SC 1 FU
432 RE_DUP_MAX POSIX SC 2 LMN 255
433 RTSIG_MAX POSIX SC 1 LMU 8
434 SAVED_IDS POSIX SC 1 FUW cc{
435 #if _lib_setuid && !_lib_setreuid
443 SCHAR_MAX C XX 1 L 127
444 SCHAR_MIN C XX 1 L -127
445 SECURITY_CLASS C QQ 1 L
447 SEMAPHORES POSIX SC 1 CDFUW
448 SEM_NSEMS_MAX POSIX SC 1 LMU 256
449 SEM_VALUE_MAX POSIX SC 1 LMU 32767
453 set '' `$CONF_getconf PATH 2>/dev/null` /bin /usr/bin /sbin /usr/sbin
457 for s in ksh ksh93 sh
461 ksh) case `$d/$s '--?-author' 2>&1` in
474 SHARED_MEMORY_OBJECTS POSIX SC 1 CDFUW
475 SHELL POSIX SC 1 FUVW
477 SHRT_MAX C XX 1 L 32767
478 SHRT_MIN C XX 1 L -32767
479 SIG_ATOMIC_MAX C XX 1 L signal.h
480 SIG_ATOMIC_MIN C XX 1 L signal.h
481 SIGQUEUE_MAX POSIX SC 1 LMU 32
482 SIGQUEUE_MAX POSIX SC 1 LMU 32
483 SIGRT_MAX SVID SC 1 0
484 SIGRT_MIN SVID SC 1 0
485 SIZE_MAX C XX 1 LMX stdint.h UINT_MAX 65535
486 SLVM_MAXNODES C QQ 1 L
490 SPIN_LOCKS POSIX SC 1 FUW
491 SPORADIC_SERVER POSIX SC 1 FUW
493 SS_REPL_MAX POSIX SC 1 FUW
494 SSIZE_MAX POSIX XX 1 LMUX INT_MAX 32767
495 STD_BLK SVID SC 1 LMU 1024
496 STREAM_MAX POSIX SC 1 LMU OPEN_MAX 8
497 STREAMS XOPEN SC 1 FSUW
498 SW_DEV POSIX SC 2 CFUW
499 SYMLINK_MAX POSIX PC 1 LMU 255 cc{
502 printf("%d", PATH_MAX-1);
506 SYMLINKS POSIX PC 2 FUW
507 SYMLOOP_MAX POSIX SC 1 LMU 8
508 SYNCHRONIZED_IO POSIX SC 1 CDFUW
509 SYNC_IO POSIX PC 1 FUW
511 SYSPID_MAX SVID SC 1 LMU 2
512 THREADS POSIX SC 1 CDFUW
513 THREADS_PRIO_CEILING POSIX SC 1 FUW
514 THREADS_PRIO_INHERIT POSIX SC 1 FUW
515 THREAD_ATTR_STACKADDR POSIX SC 1 CDFUW
516 THREAD_ATTR_STACKSIZE POSIX SC 1 CDFUW
517 THREAD_CPUTIME POSIX SC 1 FUW
518 THREAD_DESTRUCTOR_ITERATIONS POSIX SC 1 LMUW PTHREAD_DESTRUCTOR_ITERATIONS 4
519 THREAD_KEYS_MAX POSIX SC 1 LMUW PTHREAD_KEYS_MAX 128
520 THREAD_PRIORITY_SCHEDULING POSIX SC 1 CDFUW
521 THREAD_PRIO_INHERIT POSIX SC 1 CDFUW
522 THREAD_PRIO_PROTECT POSIX SC 1 CDFUW
523 THREAD_PROCESS_SHARED POSIX SC 1 CDFUW
524 THREAD_SAFE_FUNCTIONS POSIX SC 1 CDFUW
525 THREAD_SPORADIC_SERVER POSIX SC 1 FUW
526 THREAD_STACK_MIN POSIX SC 1 LUW PTHREAD_STACK_MIN
527 THREAD_THREADS_MAX POSIX SC 1 LMUW PTHREAD_THREADS_MAX 64
528 TIMEOUTS POSIX SC 1 FUW
529 TIMERS POSIX SC 1 CDFUW
530 TIMER_MAX POSIX SC 1 LMU 32
531 TMP AST CS 1 MU "/tmp"
532 TMP_MAX C SC 1 LMU 10000
534 TRACE_EVENT_FILTER POSIX SC 1 FUW
535 TRACE_EVENT_NAME_MAX POSIX SC 1 FUVW
536 TRACE_INHERIT POSIX SC 1 FUW
537 TRACE_LOG POSIX SC 1 FUW
538 TRACE_NAME_MAX POSIX SC 1 FUVW
539 TRACE_SYS_MAX POSIX SC 1 FUVW
540 TRACE_USER_EVENT_MAX POSIX SC 1 FUVW
541 TTY_NAME_MAX POSIX SC 1 LMU 9
542 TYPED_MEMORY_OBJECTS POSIX SC 1 FUW
543 TZNAME_MAX POSIX SC 1 CDLMU 6
545 UCHAR_MAX C XX 1 L 255
547 UID_MAX SVID SC 1 LMU 60002
548 UINT_MAX C XX 1 L 65535
551 ULONG_MAX C XX 1 L 4294967295
554 USER_LIMIT SVID SI 1 O
555 USHRT_MAX C XX 1 L 65535
556 V6_ILP32_OFF32 POSIX SC 1 W
557 V6_ILP32_OFFBIG POSIX SC 1 W
558 V6_LP64_OFF64 POSIX SC 1 W
559 V6_LPBIG_OFFBIG POSIX SC 1 W
560 VDISABLE POSIX PC 1 FUW
561 VERSION POSIX SC 1 CDFSU 200112
562 VERSION POSIX SC 2 CDFSU 200112
563 VERSION XOPEN SC 1 CDFSU 600
564 VERSION AST XX 1 MS _AST_VERSION
566 VERSION XPG SC 3 DFSU
567 VERSION XPG SC 4 DFSU
569 VERSION_88 POSIX SC 1 FSU
571 VERSION_90 POSIX SC 1 FSU
573 VERSION_93 POSIX SC 1 FSU
574 WCHAR_MAX C XX 1 L stddef.h
575 WCHAR_MIN C XX 1 L stddef.h
576 WINT_MIN C XX 1 L wchar.h
577 WINT_MAX C XX 1 L wchar.h
578 WORD_BIT XOPEN XX 1 L (8*sizeof(int))
579 XCU_VERSION XOPEN SC 1 CDFSU
587 VERSION TRUSTEDBSD XX 1 S