1 /* Copyright (C) 1991, 92, 1995-2008, 2009, 2010 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published
6 by the Free Software Foundation; version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software Foundation,
16 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
27 #include "../version.h"
28 #define PACKAGE _libc_intl_domainname
34 const enum { SYSCONF
, CONFSTR
, PATHCONF
} call
;
37 static const struct conf vars
[] =
40 { "LINK_MAX", _PC_LINK_MAX
, PATHCONF
},
43 { "_POSIX_LINK_MAX", _PC_LINK_MAX
, PATHCONF
},
46 { "MAX_CANON", _PC_MAX_CANON
, PATHCONF
},
49 { "_POSIX_MAX_CANON", _PC_MAX_CANON
, PATHCONF
},
52 { "MAX_INPUT", _PC_MAX_INPUT
, PATHCONF
},
55 { "_POSIX_MAX_INPUT", _PC_MAX_INPUT
, PATHCONF
},
58 { "NAME_MAX", _PC_NAME_MAX
, PATHCONF
},
61 { "_POSIX_NAME_MAX", _PC_NAME_MAX
, PATHCONF
},
64 { "PATH_MAX", _PC_PATH_MAX
, PATHCONF
},
67 { "_POSIX_PATH_MAX", _PC_PATH_MAX
, PATHCONF
},
70 { "PIPE_BUF", _PC_PIPE_BUF
, PATHCONF
},
73 { "_POSIX_PIPE_BUF", _PC_PIPE_BUF
, PATHCONF
},
75 #ifdef _PC_SOCK_MAXBUF
76 { "SOCK_MAXBUF", _PC_SOCK_MAXBUF
, PATHCONF
},
79 { "_POSIX_ASYNC_IO", _PC_ASYNC_IO
, PATHCONF
},
81 #ifdef _PC_CHOWN_RESTRICTED
82 { "_POSIX_CHOWN_RESTRICTED", _PC_CHOWN_RESTRICTED
, PATHCONF
},
85 { "_POSIX_NO_TRUNC", _PC_NO_TRUNC
, PATHCONF
},
88 { "_POSIX_PRIO_IO", _PC_PRIO_IO
, PATHCONF
},
91 { "_POSIX_SYNC_IO", _PC_SYNC_IO
, PATHCONF
},
94 { "_POSIX_VDISABLE", _PC_VDISABLE
, PATHCONF
},
98 { "ARG_MAX", _SC_ARG_MAX
, SYSCONF
},
100 #ifdef _SC_ATEXIT_MAX
101 { "ATEXIT_MAX", _SC_ATEXIT_MAX
, SYSCONF
},
104 { "CHAR_BIT", _SC_CHAR_BIT
, SYSCONF
},
107 { "CHAR_MAX", _SC_CHAR_MAX
, SYSCONF
},
110 { "CHAR_MIN", _SC_CHAR_MIN
, SYSCONF
},
113 { "CHILD_MAX", _SC_CHILD_MAX
, SYSCONF
},
116 { "CLK_TCK", _SC_CLK_TCK
, SYSCONF
},
119 { "INT_MAX", _SC_INT_MAX
, SYSCONF
},
122 { "INT_MIN", _SC_INT_MIN
, SYSCONF
},
124 #ifdef _SC_UIO_MAXIOV
125 { "IOV_MAX", _SC_UIO_MAXIOV
, SYSCONF
},
127 #ifdef _SC_LOGIN_NAME_MAX
128 { "LOGNAME_MAX", _SC_LOGIN_NAME_MAX
, SYSCONF
},
131 { "LONG_BIT", _SC_LONG_BIT
, SYSCONF
},
133 #ifdef _SC_MB_LEN_MAX
134 { "MB_LEN_MAX", _SC_MB_LEN_MAX
, SYSCONF
},
136 #ifdef _SC_NGROUPS_MAX
137 { "NGROUPS_MAX", _SC_NGROUPS_MAX
, SYSCONF
},
140 { "NL_ARGMAX", _SC_NL_ARGMAX
, SYSCONF
},
142 #ifdef _SC_NL_LANGMAX
143 { "NL_LANGMAX", _SC_NL_LANGMAX
, SYSCONF
},
146 { "NL_MSGMAX", _SC_NL_MSGMAX
, SYSCONF
},
149 { "NL_NMAX", _SC_NL_NMAX
, SYSCONF
},
152 { "NL_SETMAX", _SC_NL_SETMAX
, SYSCONF
},
154 #ifdef _SC_NL_TEXTMAX
155 { "NL_TEXTMAX", _SC_NL_TEXTMAX
, SYSCONF
},
157 #ifdef _SC_GETGR_R_SIZE_MAX
158 { "NSS_BUFLEN_GROUP", _SC_GETGR_R_SIZE_MAX
, SYSCONF
},
160 #ifdef _SC_GETPW_R_SIZE_MAX
161 { "NSS_BUFLEN_PASSWD", _SC_GETPW_R_SIZE_MAX
, SYSCONF
},
164 { "NZERO", _SC_NZERO
, SYSCONF
},
167 { "OPEN_MAX", _SC_OPEN_MAX
, SYSCONF
},
170 { "PAGESIZE", _SC_PAGESIZE
, SYSCONF
},
173 { "PAGE_SIZE", _SC_PAGESIZE
, SYSCONF
},
176 { "PASS_MAX", _SC_PASS_MAX
, SYSCONF
},
178 #ifdef _SC_THREAD_DESTRUCTOR_ITERATIONS
179 { "PTHREAD_DESTRUCTOR_ITERATIONS", _SC_THREAD_DESTRUCTOR_ITERATIONS
, SYSCONF
},
181 #ifdef _SC_THREAD_KEYS_MAX
182 { "PTHREAD_KEYS_MAX", _SC_THREAD_KEYS_MAX
, SYSCONF
},
184 #ifdef _SC_THREAD_STACK_MIN
185 { "PTHREAD_STACK_MIN", _SC_THREAD_STACK_MIN
, SYSCONF
},
187 #ifdef _SC_THREAD_THREADS_MAX
188 { "PTHREAD_THREADS_MAX", _SC_THREAD_THREADS_MAX
, SYSCONF
},
191 { "SCHAR_MAX", _SC_SCHAR_MAX
, SYSCONF
},
194 { "SCHAR_MIN", _SC_SCHAR_MIN
, SYSCONF
},
197 { "SHRT_MAX", _SC_SHRT_MAX
, SYSCONF
},
200 { "SHRT_MIN", _SC_SHRT_MIN
, SYSCONF
},
203 { "SSIZE_MAX", _SC_SSIZE_MAX
, SYSCONF
},
205 #ifdef _SC_TTY_NAME_MAX
206 { "TTY_NAME_MAX", _SC_TTY_NAME_MAX
, SYSCONF
},
208 #ifdef _SC_TZNAME_MAX
209 { "TZNAME_MAX", _SC_TZNAME_MAX
, SYSCONF
},
212 { "UCHAR_MAX", _SC_UCHAR_MAX
, SYSCONF
},
215 { "UINT_MAX", _SC_UINT_MAX
, SYSCONF
},
217 #ifdef _SC_UIO_MAXIOV
218 { "UIO_MAXIOV", _SC_UIO_MAXIOV
, SYSCONF
},
221 { "ULONG_MAX", _SC_ULONG_MAX
, SYSCONF
},
224 { "USHRT_MAX", _SC_USHRT_MAX
, SYSCONF
},
227 { "WORD_BIT", _SC_WORD_BIT
, SYSCONF
},
229 #ifdef _SC_AVPHYS_PAGES
230 { "_AVPHYS_PAGES", _SC_AVPHYS_PAGES
, SYSCONF
},
232 #ifdef _SC_NPROCESSORS_CONF
233 { "_NPROCESSORS_CONF", _SC_NPROCESSORS_CONF
, SYSCONF
},
235 #ifdef _SC_NPROCESSORS_ONLN
236 { "_NPROCESSORS_ONLN", _SC_NPROCESSORS_ONLN
, SYSCONF
},
238 #ifdef _SC_PHYS_PAGES
239 { "_PHYS_PAGES", _SC_PHYS_PAGES
, SYSCONF
},
242 { "_POSIX_ARG_MAX", _SC_ARG_MAX
, SYSCONF
},
244 #ifdef _SC_ASYNCHRONOUS_IO
245 { "_POSIX_ASYNCHRONOUS_IO", _SC_ASYNCHRONOUS_IO
, SYSCONF
},
248 { "_POSIX_CHILD_MAX", _SC_CHILD_MAX
, SYSCONF
},
251 { "_POSIX_FSYNC", _SC_FSYNC
, SYSCONF
},
253 #ifdef _SC_JOB_CONTROL
254 { "_POSIX_JOB_CONTROL", _SC_JOB_CONTROL
, SYSCONF
},
256 #ifdef _SC_MAPPED_FILES
257 { "_POSIX_MAPPED_FILES", _SC_MAPPED_FILES
, SYSCONF
},
260 { "_POSIX_MEMLOCK", _SC_MEMLOCK
, SYSCONF
},
262 #ifdef _SC_MEMLOCK_RANGE
263 { "_POSIX_MEMLOCK_RANGE", _SC_MEMLOCK_RANGE
, SYSCONF
},
265 #ifdef _SC_MEMORY_PROTECTION
266 { "_POSIX_MEMORY_PROTECTION", _SC_MEMORY_PROTECTION
, SYSCONF
},
268 #ifdef _SC_MESSAGE_PASSING
269 { "_POSIX_MESSAGE_PASSING", _SC_MESSAGE_PASSING
, SYSCONF
},
271 #ifdef _SC_NGROUPS_MAX
272 { "_POSIX_NGROUPS_MAX", _SC_NGROUPS_MAX
, SYSCONF
},
275 { "_POSIX_OPEN_MAX", _SC_OPEN_MAX
, SYSCONF
},
278 { "_POSIX_PII", _SC_PII
, SYSCONF
},
280 #ifdef _SC_PII_INTERNET
281 { "_POSIX_PII_INTERNET", _SC_PII_INTERNET
, SYSCONF
},
283 #ifdef _SC_PII_INTERNET_DGRAM
284 { "_POSIX_PII_INTERNET_DGRAM", _SC_PII_INTERNET_DGRAM
, SYSCONF
},
286 #ifdef _SC_PII_INTERNET_STREAM
287 { "_POSIX_PII_INTERNET_STREAM", _SC_PII_INTERNET_STREAM
, SYSCONF
},
290 { "_POSIX_PII_OSI", _SC_PII_OSI
, SYSCONF
},
292 #ifdef _SC_PII_OSI_CLTS
293 { "_POSIX_PII_OSI_CLTS", _SC_PII_OSI_CLTS
, SYSCONF
},
295 #ifdef _SC_PII_OSI_COTS
296 { "_POSIX_PII_OSI_COTS", _SC_PII_OSI_COTS
, SYSCONF
},
299 { "_POSIX_PII_OSI_M", _SC_PII_OSI_M
, SYSCONF
},
301 #ifdef _SC_PII_SOCKET
302 { "_POSIX_PII_SOCKET", _SC_PII_SOCKET
, SYSCONF
},
305 { "_POSIX_PII_XTI", _SC_PII_XTI
, SYSCONF
},
308 { "_POSIX_POLL", _SC_POLL
, SYSCONF
},
310 #ifdef _SC_PRIORITIZED_IO
311 { "_POSIX_PRIORITIZED_IO", _SC_PRIORITIZED_IO
, SYSCONF
},
313 #ifdef _SC_PRIORITY_SCHEDULING
314 { "_POSIX_PRIORITY_SCHEDULING", _SC_PRIORITY_SCHEDULING
, SYSCONF
},
316 #ifdef _SC_REALTIME_SIGNALS
317 { "_POSIX_REALTIME_SIGNALS", _SC_REALTIME_SIGNALS
, SYSCONF
},
320 { "_POSIX_SAVED_IDS", _SC_SAVED_IDS
, SYSCONF
},
323 { "_POSIX_SELECT", _SC_SELECT
, SYSCONF
},
325 #ifdef _SC_SEMAPHORES
326 { "_POSIX_SEMAPHORES", _SC_SEMAPHORES
, SYSCONF
},
328 #ifdef _SC_SHARED_MEMORY_OBJECTS
329 { "_POSIX_SHARED_MEMORY_OBJECTS", _SC_SHARED_MEMORY_OBJECTS
, SYSCONF
},
332 { "_POSIX_SSIZE_MAX", _SC_SSIZE_MAX
, SYSCONF
},
334 #ifdef _SC_STREAM_MAX
335 { "_POSIX_STREAM_MAX", _SC_STREAM_MAX
, SYSCONF
},
337 #ifdef _SC_SYNCHRONIZED_IO
338 { "_POSIX_SYNCHRONIZED_IO", _SC_SYNCHRONIZED_IO
, SYSCONF
},
341 { "_POSIX_THREADS", _SC_THREADS
, SYSCONF
},
343 #ifdef _SC_THREAD_ATTR_STACKADDR
344 { "_POSIX_THREAD_ATTR_STACKADDR", _SC_THREAD_ATTR_STACKADDR
, SYSCONF
},
346 #ifdef _SC_THREAD_ATTR_STACKSIZE
347 { "_POSIX_THREAD_ATTR_STACKSIZE", _SC_THREAD_ATTR_STACKSIZE
, SYSCONF
},
349 #ifdef _SC_THREAD_PRIORITY_SCHEDULING
350 { "_POSIX_THREAD_PRIORITY_SCHEDULING", _SC_THREAD_PRIORITY_SCHEDULING
, SYSCONF
},
352 #ifdef _SC_THREAD_PRIO_INHERIT
353 { "_POSIX_THREAD_PRIO_INHERIT", _SC_THREAD_PRIO_INHERIT
, SYSCONF
},
355 #ifdef _SC_THREAD_PRIO_PROTECT
356 { "_POSIX_THREAD_PRIO_PROTECT", _SC_THREAD_PRIO_PROTECT
, SYSCONF
},
358 #ifdef _SC_THREAD_ROBUST_PRIO_INHERIT
359 { "_POSIX_THREAD_ROBUST_PRIO_INHERIT", _SC_THREAD_ROBUST_PRIO_INHERIT
,
362 #ifdef _SC_THREAD_ROBUST_PRIO_PROTECT
363 { "_POSIX_THREAD_ROBUST_PRIO_PROTECT", _SC_THREAD_ROBUST_PRIO_PROTECT
,
366 #ifdef _SC_THREAD_PROCESS_SHARED
367 { "_POSIX_THREAD_PROCESS_SHARED", _SC_THREAD_PROCESS_SHARED
, SYSCONF
},
369 #ifdef _SC_THREAD_SAFE_FUNCTIONS
370 { "_POSIX_THREAD_SAFE_FUNCTIONS", _SC_THREAD_SAFE_FUNCTIONS
, SYSCONF
},
373 { "_POSIX_TIMERS", _SC_TIMERS
, SYSCONF
},
376 { "TIMER_MAX", _SC_TIMER_MAX
, SYSCONF
},
378 #ifdef _SC_TZNAME_MAX
379 { "_POSIX_TZNAME_MAX", _SC_TZNAME_MAX
, SYSCONF
},
382 { "_POSIX_VERSION", _SC_VERSION
, SYSCONF
},
385 { "_T_IOV_MAX", _SC_T_IOV_MAX
, SYSCONF
},
387 #ifdef _SC_XOPEN_CRYPT
388 { "_XOPEN_CRYPT", _SC_XOPEN_CRYPT
, SYSCONF
},
390 #ifdef _SC_XOPEN_ENH_I18N
391 { "_XOPEN_ENH_I18N", _SC_XOPEN_ENH_I18N
, SYSCONF
},
393 #ifdef _SC_XOPEN_LEGACY
394 { "_XOPEN_LEGACY", _SC_XOPEN_LEGACY
, SYSCONF
},
396 #ifdef _SC_XOPEN_REALTIME
397 { "_XOPEN_REALTIME", _SC_XOPEN_REALTIME
, SYSCONF
},
399 #ifdef _SC_XOPEN_REALTIME_THREADS
400 { "_XOPEN_REALTIME_THREADS", _SC_XOPEN_REALTIME_THREADS
, SYSCONF
},
403 { "_XOPEN_SHM", _SC_XOPEN_SHM
, SYSCONF
},
405 #ifdef _SC_XOPEN_UNIX
406 { "_XOPEN_UNIX", _SC_XOPEN_UNIX
, SYSCONF
},
408 #ifdef _SC_XOPEN_VERSION
409 { "_XOPEN_VERSION", _SC_XOPEN_VERSION
, SYSCONF
},
411 #ifdef _SC_XOPEN_XCU_VERSION
412 { "_XOPEN_XCU_VERSION", _SC_XOPEN_XCU_VERSION
, SYSCONF
},
414 #ifdef _SC_XOPEN_XPG2
415 { "_XOPEN_XPG2", _SC_XOPEN_XPG2
, SYSCONF
},
417 #ifdef _SC_XOPEN_XPG3
418 { "_XOPEN_XPG3", _SC_XOPEN_XPG3
, SYSCONF
},
420 #ifdef _SC_XOPEN_XPG4
421 { "_XOPEN_XPG4", _SC_XOPEN_XPG4
, SYSCONF
},
424 #ifdef _SC_BC_BASE_MAX
425 { "BC_BASE_MAX", _SC_BC_BASE_MAX
, SYSCONF
},
427 #ifdef _SC_BC_DIM_MAX
428 { "BC_DIM_MAX", _SC_BC_DIM_MAX
, SYSCONF
},
430 #ifdef _SC_BC_SCALE_MAX
431 { "BC_SCALE_MAX", _SC_BC_SCALE_MAX
, SYSCONF
},
433 #ifdef _SC_BC_STRING_MAX
434 { "BC_STRING_MAX", _SC_BC_STRING_MAX
, SYSCONF
},
436 { "CHARCLASS_NAME_MAX", _SC_CHARCLASS_NAME_MAX
, SYSCONF
},
437 #ifdef _SC_COLL_WEIGHTS_MAX
438 { "COLL_WEIGHTS_MAX", _SC_COLL_WEIGHTS_MAX
, SYSCONF
},
440 #ifdef _SC_EQUIV_CLASS_MAX
441 { "EQUIV_CLASS_MAX", _SC_EQUIV_CLASS_MAX
, SYSCONF
},
443 #ifdef _SC_EXPR_NEST_MAX
444 { "EXPR_NEST_MAX", _SC_EXPR_NEST_MAX
, SYSCONF
},
447 { "LINE_MAX", _SC_LINE_MAX
, SYSCONF
},
449 #ifdef _SC_BC_BASE_MAX
450 { "POSIX2_BC_BASE_MAX", _SC_BC_BASE_MAX
, SYSCONF
},
452 #ifdef _SC_BC_DIM_MAX
453 { "POSIX2_BC_DIM_MAX", _SC_BC_DIM_MAX
, SYSCONF
},
455 #ifdef _SC_BC_SCALE_MAX
456 { "POSIX2_BC_SCALE_MAX", _SC_BC_SCALE_MAX
, SYSCONF
},
458 #ifdef _SC_BC_STRING_MAX
459 { "POSIX2_BC_STRING_MAX", _SC_BC_STRING_MAX
, SYSCONF
},
461 #ifdef _SC_2_CHAR_TERM
462 { "POSIX2_CHAR_TERM", _SC_2_CHAR_TERM
, SYSCONF
},
464 #ifdef _SC_COLL_WEIGHTS_MAX
465 { "POSIX2_COLL_WEIGHTS_MAX", _SC_COLL_WEIGHTS_MAX
, SYSCONF
},
468 { "POSIX2_C_BIND", _SC_2_C_BIND
, SYSCONF
},
471 { "POSIX2_C_DEV", _SC_2_C_DEV
, SYSCONF
},
473 #ifdef _SC_2_C_VERSION
474 { "POSIX2_C_VERSION", _SC_2_C_VERSION
, SYSCONF
},
476 #ifdef _SC_EXPR_NEST_MAX
477 { "POSIX2_EXPR_NEST_MAX", _SC_EXPR_NEST_MAX
, SYSCONF
},
479 #ifdef _SC_2_FORT_DEV
480 { "POSIX2_FORT_DEV", _SC_2_FORT_DEV
, SYSCONF
},
482 #ifdef _SC_2_FORT_RUN
483 { "POSIX2_FORT_RUN", _SC_2_FORT_RUN
, SYSCONF
},
486 { "_POSIX2_LINE_MAX", _SC_LINE_MAX
, SYSCONF
},
487 { "POSIX2_LINE_MAX", _SC_LINE_MAX
, SYSCONF
},
489 #ifdef _SC_2_LOCALEDEF
490 { "POSIX2_LOCALEDEF", _SC_2_LOCALEDEF
, SYSCONF
},
492 #ifdef _SC_RE_DUP_MAX
493 { "POSIX2_RE_DUP_MAX", _SC_RE_DUP_MAX
, SYSCONF
},
496 { "POSIX2_SW_DEV", _SC_2_SW_DEV
, SYSCONF
},
499 { "POSIX2_UPE", _SC_2_UPE
, SYSCONF
},
502 { "POSIX2_VERSION", _SC_2_VERSION
, SYSCONF
},
504 #ifdef _SC_RE_DUP_MAX
505 { "RE_DUP_MAX", _SC_RE_DUP_MAX
, SYSCONF
},
509 { "PATH", _CS_PATH
, CONFSTR
},
510 { "CS_PATH", _CS_PATH
, CONFSTR
},
514 #ifdef _CS_LFS_CFLAGS
515 { "LFS_CFLAGS", _CS_LFS_CFLAGS
, CONFSTR
},
517 #ifdef _CS_LFS_LDFLAGS
518 { "LFS_LDFLAGS", _CS_LFS_LDFLAGS
, CONFSTR
},
521 { "LFS_LIBS", _CS_LFS_LIBS
, CONFSTR
},
523 #ifdef _CS_LFS_LINTFLAGS
524 { "LFS_LINTFLAGS", _CS_LFS_LINTFLAGS
, CONFSTR
},
526 #ifdef _CS_LFS64_CFLAGS
527 { "LFS64_CFLAGS", _CS_LFS64_CFLAGS
, CONFSTR
},
529 #ifdef _CS_LFS64_LDFLAGS
530 { "LFS64_LDFLAGS", _CS_LFS64_LDFLAGS
, CONFSTR
},
532 #ifdef _CS_LFS64_LIBS
533 { "LFS64_LIBS", _CS_LFS64_LIBS
, CONFSTR
},
535 #ifdef _CS_LFS64_LINTFLAGS
536 { "LFS64_LINTFLAGS", _CS_LFS64_LINTFLAGS
, CONFSTR
},
539 /* Programming environments. */
540 #ifdef _CS_V5_WIDTH_RESTRICTED_ENVS
541 { "_XBS5_WIDTH_RESTRICTED_ENVS", _CS_V5_WIDTH_RESTRICTED_ENVS
, CONFSTR
},
542 { "XBS5_WIDTH_RESTRICTED_ENVS", _CS_V5_WIDTH_RESTRICTED_ENVS
, CONFSTR
},
545 #ifdef _SC_XBS5_ILP32_OFF32
546 { "_XBS5_ILP32_OFF32", _SC_XBS5_ILP32_OFF32
, SYSCONF
},
548 #ifdef _CS_XBS5_ILP32_OFF32_CFLAGS
549 { "XBS5_ILP32_OFF32_CFLAGS", _CS_XBS5_ILP32_OFF32_CFLAGS
, CONFSTR
},
551 #ifdef _CS_XBS5_ILP32_OFF32_LDFLAGS
552 { "XBS5_ILP32_OFF32_LDFLAGS", _CS_XBS5_ILP32_OFF32_LDFLAGS
, CONFSTR
},
554 #ifdef _CS_XBS5_ILP32_OFF32_LIBS
555 { "XBS5_ILP32_OFF32_LIBS", _CS_XBS5_ILP32_OFF32_LIBS
, CONFSTR
},
557 #ifdef _CS_XBS5_ILP32_OFF32_LINTFLAGS
558 { "XBS5_ILP32_OFF32_LINTFLAGS", _CS_XBS5_ILP32_OFF32_LINTFLAGS
, CONFSTR
},
561 #ifdef _SC_XBS5_ILP32_OFFBIG
562 { "_XBS5_ILP32_OFFBIG", _SC_XBS5_ILP32_OFFBIG
, SYSCONF
},
564 #ifdef _CS_XBS5_ILP32_OFFBIG_CFLAGS
565 { "XBS5_ILP32_OFFBIG_CFLAGS", _CS_XBS5_ILP32_OFFBIG_CFLAGS
, CONFSTR
},
567 #ifdef _CS_XBS5_ILP32_OFFBIG_LDFLAGS
568 { "XBS5_ILP32_OFFBIG_LDFLAGS", _CS_XBS5_ILP32_OFFBIG_LDFLAGS
, CONFSTR
},
570 #ifdef _CS_XBS5_ILP32_OFFBIG_LIBS
571 { "XBS5_ILP32_OFFBIG_LIBS", _CS_XBS5_ILP32_OFFBIG_LIBS
, CONFSTR
},
573 #ifdef _CS_XBS5_ILP32_OFFBIG_LINTFLAGS
574 { "XBS5_ILP32_OFFBIG_LINTFLAGS", _CS_XBS5_ILP32_OFFBIG_LINTFLAGS
, CONFSTR
},
577 #ifdef _SC_XBS5_LP64_OFF64
578 { "_XBS5_LP64_OFF64", _SC_XBS5_LP64_OFF64
, SYSCONF
},
580 #ifdef _CS_XBS5_LP64_OFF64_CFLAGS
581 { "XBS5_LP64_OFF64_CFLAGS", _CS_XBS5_LP64_OFF64_CFLAGS
, CONFSTR
},
583 #ifdef _CS_XBS5_LP64_OFF64_LDFLAGS
584 { "XBS5_LP64_OFF64_LDFLAGS", _CS_XBS5_LP64_OFF64_LDFLAGS
, CONFSTR
},
586 #ifdef _CS_XBS5_LP64_OFF64_LIBS
587 { "XBS5_LP64_OFF64_LIBS", _CS_XBS5_LP64_OFF64_LIBS
, CONFSTR
},
589 #ifdef _CS_XBS5_LP64_OFF64_LINTFLAGS
590 { "XBS5_LP64_OFF64_LINTFLAGS", _CS_XBS5_LP64_OFF64_LINTFLAGS
, CONFSTR
},
593 #ifdef _SC_XBS5_LPBIG_OFFBIG
594 { "_XBS5_LPBIG_OFFBIG", _SC_XBS5_LPBIG_OFFBIG
, SYSCONF
},
596 #ifdef _CS_XBS5_LPBIG_OFFBIG_CFLAGS
597 { "XBS5_LPBIG_OFFBIG_CFLAGS", _CS_XBS5_LPBIG_OFFBIG_CFLAGS
, CONFSTR
},
599 #ifdef _CS_XBS5_LPBIG_OFFBIG_LDFLAGS
600 { "XBS5_LPBIG_OFFBIG_LDFLAGS", _CS_XBS5_LPBIG_OFFBIG_LDFLAGS
, CONFSTR
},
602 #ifdef _CS_XBS5_LPBIG_OFFBIG_LIBS
603 { "XBS5_LPBIG_OFFBIG_LIBS", _CS_XBS5_LPBIG_OFFBIG_LIBS
, CONFSTR
},
605 #ifdef _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS
606 { "XBS5_LPBIG_OFFBIG_LINTFLAGS", _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS
, CONFSTR
},
609 #ifdef _SC_V6_ILP32_OFF32
610 { "_POSIX_V6_ILP32_OFF32", _SC_V6_ILP32_OFF32
, SYSCONF
},
612 #ifdef _CS_POSIX_V6_ILP32_OFF32_CFLAGS
613 { "POSIX_V6_ILP32_OFF32_CFLAGS", _CS_POSIX_V6_ILP32_OFF32_CFLAGS
, CONFSTR
},
615 #ifdef _CS_POSIX_V6_ILP32_OFF32_LDFLAGS
616 { "POSIX_V6_ILP32_OFF32_LDFLAGS", _CS_POSIX_V6_ILP32_OFF32_LDFLAGS
, CONFSTR
},
618 #ifdef _CS_POSIX_V6_ILP32_OFF32_LIBS
619 { "POSIX_V6_ILP32_OFF32_LIBS", _CS_POSIX_V6_ILP32_OFF32_LIBS
, CONFSTR
},
621 #ifdef _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS
622 { "POSIX_V6_ILP32_OFF32_LINTFLAGS", _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS
, CONFSTR
},
625 #ifdef _CS_V6_WIDTH_RESTRICTED_ENVS
626 { "_POSIX_V6_WIDTH_RESTRICTED_ENVS", _CS_V6_WIDTH_RESTRICTED_ENVS
, CONFSTR
},
627 { "POSIX_V6_WIDTH_RESTRICTED_ENVS", _CS_V6_WIDTH_RESTRICTED_ENVS
, CONFSTR
},
630 #ifdef _SC_V6_ILP32_OFFBIG
631 { "_POSIX_V6_ILP32_OFFBIG", _SC_V6_ILP32_OFFBIG
, SYSCONF
},
633 #ifdef _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
634 { "POSIX_V6_ILP32_OFFBIG_CFLAGS", _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
, CONFSTR
},
636 #ifdef _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
637 { "POSIX_V6_ILP32_OFFBIG_LDFLAGS", _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
, CONFSTR
},
639 #ifdef _CS_POSIX_V6_ILP32_OFFBIG_LIBS
640 { "POSIX_V6_ILP32_OFFBIG_LIBS", _CS_POSIX_V6_ILP32_OFFBIG_LIBS
, CONFSTR
},
642 #ifdef _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS
643 { "POSIX_V6_ILP32_OFFBIG_LINTFLAGS", _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS
, CONFSTR
},
646 #ifdef _SC_V6_LP64_OFF64
647 { "_POSIX_V6_LP64_OFF64", _SC_V6_LP64_OFF64
, SYSCONF
},
649 #ifdef _CS_POSIX_V6_LP64_OFF64_CFLAGS
650 { "POSIX_V6_LP64_OFF64_CFLAGS", _CS_POSIX_V6_LP64_OFF64_CFLAGS
, CONFSTR
},
652 #ifdef _CS_POSIX_V6_LP64_OFF64_LDFLAGS
653 { "POSIX_V6_LP64_OFF64_LDFLAGS", _CS_POSIX_V6_LP64_OFF64_LDFLAGS
, CONFSTR
},
655 #ifdef _CS_POSIX_V6_LP64_OFF64_LIBS
656 { "POSIX_V6_LP64_OFF64_LIBS", _CS_POSIX_V6_LP64_OFF64_LIBS
, CONFSTR
},
658 #ifdef _CS_POSIX_V6_LP64_OFF64_LINTFLAGS
659 { "POSIX_V6_LP64_OFF64_LINTFLAGS", _CS_POSIX_V6_LP64_OFF64_LINTFLAGS
, CONFSTR
},
662 #ifdef _SC_V6_LPBIG_OFFBIG
663 { "_POSIX_V6_LPBIG_OFFBIG", _SC_V6_LPBIG_OFFBIG
, SYSCONF
},
665 #ifdef _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
666 { "POSIX_V6_LPBIG_OFFBIG_CFLAGS", _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
, CONFSTR
},
668 #ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
669 { "POSIX_V6_LPBIG_OFFBIG_LDFLAGS", _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
, CONFSTR
},
671 #ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LIBS
672 { "POSIX_V6_LPBIG_OFFBIG_LIBS", _CS_POSIX_V6_LPBIG_OFFBIG_LIBS
, CONFSTR
},
674 #ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
675 { "POSIX_V6_LPBIG_OFFBIG_LINTFLAGS", _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
, CONFSTR
},
678 #ifdef _SC_V7_ILP32_OFF32
679 { "_POSIX_V7_ILP32_OFF32", _SC_V7_ILP32_OFF32
, SYSCONF
},
681 #ifdef _CS_POSIX_V7_ILP32_OFF32_CFLAGS
682 { "POSIX_V7_ILP32_OFF32_CFLAGS", _CS_POSIX_V7_ILP32_OFF32_CFLAGS
, CONFSTR
},
684 #ifdef _CS_POSIX_V7_ILP32_OFF32_LDFLAGS
685 { "POSIX_V7_ILP32_OFF32_LDFLAGS", _CS_POSIX_V7_ILP32_OFF32_LDFLAGS
, CONFSTR
},
687 #ifdef _CS_POSIX_V7_ILP32_OFF32_LIBS
688 { "POSIX_V7_ILP32_OFF32_LIBS", _CS_POSIX_V7_ILP32_OFF32_LIBS
, CONFSTR
},
690 #ifdef _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS
691 { "POSIX_V7_ILP32_OFF32_LINTFLAGS", _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS
, CONFSTR
},
694 #ifdef _CS_V7_WIDTH_RESTRICTED_ENVS
695 { "_POSIX_V7_WIDTH_RESTRICTED_ENVS", _CS_V7_WIDTH_RESTRICTED_ENVS
, CONFSTR
},
696 { "POSIX_V7_WIDTH_RESTRICTED_ENVS", _CS_V7_WIDTH_RESTRICTED_ENVS
, CONFSTR
},
699 #ifdef _SC_V7_ILP32_OFFBIG
700 { "_POSIX_V7_ILP32_OFFBIG", _SC_V7_ILP32_OFFBIG
, SYSCONF
},
702 #ifdef _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS
703 { "POSIX_V7_ILP32_OFFBIG_CFLAGS", _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS
, CONFSTR
},
705 #ifdef _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS
706 { "POSIX_V7_ILP32_OFFBIG_LDFLAGS", _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS
, CONFSTR
},
708 #ifdef _CS_POSIX_V7_ILP32_OFFBIG_LIBS
709 { "POSIX_V7_ILP32_OFFBIG_LIBS", _CS_POSIX_V7_ILP32_OFFBIG_LIBS
, CONFSTR
},
711 #ifdef _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS
712 { "POSIX_V7_ILP32_OFFBIG_LINTFLAGS", _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS
, CONFSTR
},
715 #ifdef _SC_V7_LP64_OFF64
716 { "_POSIX_V7_LP64_OFF64", _SC_V7_LP64_OFF64
, SYSCONF
},
718 #ifdef _CS_POSIX_V7_LP64_OFF64_CFLAGS
719 { "POSIX_V7_LP64_OFF64_CFLAGS", _CS_POSIX_V7_LP64_OFF64_CFLAGS
, CONFSTR
},
721 #ifdef _CS_POSIX_V7_LP64_OFF64_LDFLAGS
722 { "POSIX_V7_LP64_OFF64_LDFLAGS", _CS_POSIX_V7_LP64_OFF64_LDFLAGS
, CONFSTR
},
724 #ifdef _CS_POSIX_V7_LP64_OFF64_LIBS
725 { "POSIX_V7_LP64_OFF64_LIBS", _CS_POSIX_V7_LP64_OFF64_LIBS
, CONFSTR
},
727 #ifdef _CS_POSIX_V7_LP64_OFF64_LINTFLAGS
728 { "POSIX_V7_LP64_OFF64_LINTFLAGS", _CS_POSIX_V7_LP64_OFF64_LINTFLAGS
, CONFSTR
},
731 #ifdef _SC_V7_LPBIG_OFFBIG
732 { "_POSIX_V7_LPBIG_OFFBIG", _SC_V7_LPBIG_OFFBIG
, SYSCONF
},
734 #ifdef _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS
735 { "POSIX_V7_LPBIG_OFFBIG_CFLAGS", _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS
, CONFSTR
},
737 #ifdef _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS
738 { "POSIX_V7_LPBIG_OFFBIG_LDFLAGS", _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS
, CONFSTR
},
740 #ifdef _CS_POSIX_V7_LPBIG_OFFBIG_LIBS
741 { "POSIX_V7_LPBIG_OFFBIG_LIBS", _CS_POSIX_V7_LPBIG_OFFBIG_LIBS
, CONFSTR
},
743 #ifdef _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS
744 { "POSIX_V7_LPBIG_OFFBIG_LINTFLAGS", _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS
, CONFSTR
},
747 #ifdef _SC_ADVISORY_INFO
748 { "_POSIX_ADVISORY_INFO", _SC_ADVISORY_INFO
, SYSCONF
},
751 { "_POSIX_BARRIERS", _SC_BARRIERS
, SYSCONF
},
754 { "_POSIX_BASE", _SC_BASE
, SYSCONF
},
756 #ifdef _SC_C_LANG_SUPPORT
757 { "_POSIX_C_LANG_SUPPORT", _SC_C_LANG_SUPPORT
, SYSCONF
},
759 #ifdef _SC_C_LANG_SUPPORT_R
760 { "_POSIX_C_LANG_SUPPORT_R", _SC_C_LANG_SUPPORT_R
, SYSCONF
},
762 #ifdef _SC_CLOCK_SELECTION
763 { "_POSIX_CLOCK_SELECTION", _SC_CLOCK_SELECTION
, SYSCONF
},
766 { "_POSIX_CPUTIME", _SC_CPUTIME
, SYSCONF
},
768 #ifdef _SC_THREAD_CPUTIME
769 { "_POSIX_THREAD_CPUTIME", _SC_THREAD_CPUTIME
, SYSCONF
},
771 #ifdef _SC_DEVICE_SPECIFIC
772 { "_POSIX_DEVICE_SPECIFIC", _SC_DEVICE_SPECIFIC
, SYSCONF
},
774 #ifdef _SC_DEVICE_SPECIFIC_R
775 { "_POSIX_DEVICE_SPECIFIC_R", _SC_DEVICE_SPECIFIC_R
, SYSCONF
},
778 { "_POSIX_FD_MGMT", _SC_FD_MGMT
, SYSCONF
},
781 { "_POSIX_FIFO", _SC_FIFO
, SYSCONF
},
784 { "_POSIX_PIPE", _SC_PIPE
, SYSCONF
},
786 #ifdef _SC_FILE_ATTRIBUTES
787 { "_POSIX_FILE_ATTRIBUTES", _SC_FILE_ATTRIBUTES
, SYSCONF
},
789 #ifdef _SC_FILE_LOCKING
790 { "_POSIX_FILE_LOCKING", _SC_FILE_LOCKING
, SYSCONF
},
792 #ifdef _SC_FILE_SYSTEM
793 { "_POSIX_FILE_SYSTEM", _SC_FILE_SYSTEM
, SYSCONF
},
795 #ifdef _SC_MONOTONIC_CLOCK
796 { "_POSIX_MONOTONIC_CLOCK", _SC_MONOTONIC_CLOCK
, SYSCONF
},
798 #ifdef _SC_MULTI_PROCESS
799 { "_POSIX_MULTI_PROCESS", _SC_MULTI_PROCESS
, SYSCONF
},
801 #ifdef _SC_SINGLE_PROCESS
802 { "_POSIX_SINGLE_PROCESS", _SC_SINGLE_PROCESS
, SYSCONF
},
804 #ifdef _SC_NETWORKING
805 { "_POSIX_NETWORKING", _SC_NETWORKING
, SYSCONF
},
807 #ifdef _SC_READER_WRITER_LOCKS
808 { "_POSIX_READER_WRITER_LOCKS", _SC_READER_WRITER_LOCKS
, SYSCONF
},
810 #ifdef _SC_SPIN_LOCKS
811 { "_POSIX_SPIN_LOCKS", _SC_SPIN_LOCKS
, SYSCONF
},
814 { "_POSIX_REGEXP", _SC_REGEXP
, SYSCONF
},
816 #ifdef _SC_REGEX_VERSION
817 { "_REGEX_VERSION", _SC_REGEX_VERSION
, SYSCONF
},
820 { "_POSIX_SHELL", _SC_SHELL
, SYSCONF
},
823 { "_POSIX_SIGNALS", _SC_SIGNALS
, SYSCONF
},
826 { "_POSIX_SPAWN", _SC_SPAWN
, SYSCONF
},
828 #ifdef _SC_SPORADIC_SERVER
829 { "_POSIX_SPORADIC_SERVER", _SC_SPORADIC_SERVER
, SYSCONF
},
831 #ifdef _SC_THREAD_SPORADIC_SERVER
832 { "_POSIX_THREAD_SPORADIC_SERVER", _SC_THREAD_SPORADIC_SERVER
, SYSCONF
},
834 #ifdef _SC_SYSTEM_DATABASE
835 { "_POSIX_SYSTEM_DATABASE", _SC_SYSTEM_DATABASE
, SYSCONF
},
837 #ifdef _SC_SYSTEM_DATABASE_R
838 { "_POSIX_SYSTEM_DATABASE_R", _SC_SYSTEM_DATABASE_R
, SYSCONF
},
841 { "_POSIX_TIMEOUTS", _SC_TIMEOUTS
, SYSCONF
},
843 #ifdef _SC_TYPED_MEMORY_OBJECTS
844 { "_POSIX_TYPED_MEMORY_OBJECTS", _SC_TYPED_MEMORY_OBJECTS
, SYSCONF
},
846 #ifdef _SC_USER_GROUPS
847 { "_POSIX_USER_GROUPS", _SC_USER_GROUPS
, SYSCONF
},
849 #ifdef _SC_USER_GROUPS_R
850 { "_POSIX_USER_GROUPS_R", _SC_USER_GROUPS_R
, SYSCONF
},
853 { "POSIX2_PBS", _SC_2_PBS
, SYSCONF
},
855 #ifdef _SC_2_PBS_ACCOUNTING
856 { "POSIX2_PBS_ACCOUNTING", _SC_2_PBS_ACCOUNTING
, SYSCONF
},
858 #ifdef _SC_2_PBS_LOCATE
859 { "POSIX2_PBS_LOCATE", _SC_2_PBS_LOCATE
, SYSCONF
},
861 #ifdef _SC_2_PBS_TRACK
862 { "POSIX2_PBS_TRACK", _SC_2_PBS_TRACK
, SYSCONF
},
864 #ifdef _SC_2_PBS_MESSAGE
865 { "POSIX2_PBS_MESSAGE", _SC_2_PBS_MESSAGE
, SYSCONF
},
867 #ifdef _SC_SYMLOOP_MAX
868 { "SYMLOOP_MAX", _SC_SYMLOOP_MAX
, SYSCONF
},
870 #ifdef _SC_STREAM_MAX
871 { "STREAM_MAX", _SC_STREAM_MAX
, SYSCONF
},
873 #ifdef _SC_AIO_LISTIO_MAX
874 { "AIO_LISTIO_MAX", _SC_AIO_LISTIO_MAX
, SYSCONF
},
877 { "AIO_MAX", _SC_AIO_MAX
, SYSCONF
},
879 #ifdef _SC_AIO_PRIO_DELTA_MAX
880 { "AIO_PRIO_DELTA_MAX", _SC_AIO_PRIO_DELTA_MAX
, SYSCONF
},
882 #ifdef _SC_DELAYTIMER_MAX
883 { "DELAYTIMER_MAX", _SC_DELAYTIMER_MAX
, SYSCONF
},
885 #ifdef _SC_HOST_NAME_MAX
886 { "HOST_NAME_MAX", _SC_HOST_NAME_MAX
, SYSCONF
},
888 #ifdef _SC_LOGIN_NAME_MAX
889 { "LOGIN_NAME_MAX", _SC_LOGIN_NAME_MAX
, SYSCONF
},
891 #ifdef _SC_MQ_OPEN_MAX
892 { "MQ_OPEN_MAX", _SC_MQ_OPEN_MAX
, SYSCONF
},
894 #ifdef _SC_MQ_PRIO_MAX
895 { "MQ_PRIO_MAX", _SC_MQ_PRIO_MAX
, SYSCONF
},
898 { "_POSIX_DEVICE_IO", _SC_DEVICE_IO
, SYSCONF
},
901 { "_POSIX_TRACE", _SC_TRACE
, SYSCONF
},
903 #ifdef _SC_TRACE_EVENT_FILTER
904 { "_POSIX_TRACE_EVENT_FILTER", _SC_TRACE_EVENT_FILTER
, SYSCONF
},
906 #ifdef _SC_TRACE_INHERIT
907 { "_POSIX_TRACE_INHERIT", _SC_TRACE_INHERIT
, SYSCONF
},
910 { "_POSIX_TRACE_LOG", _SC_TRACE_LOG
, SYSCONF
},
913 { "RTSIG_MAX", _SC_RTSIG_MAX
, SYSCONF
},
915 #ifdef _SC_SEM_NSEMS_MAX
916 { "SEM_NSEMS_MAX", _SC_SEM_NSEMS_MAX
, SYSCONF
},
918 #ifdef _SC_SEM_VALUE_MAX
919 { "SEM_VALUE_MAX", _SC_SEM_VALUE_MAX
, SYSCONF
},
921 #ifdef _SC_SIGQUEUE_MAX
922 { "SIGQUEUE_MAX", _SC_SIGQUEUE_MAX
, SYSCONF
},
924 #ifdef _PC_FILESIZEBITS
925 { "FILESIZEBITS", _PC_FILESIZEBITS
, PATHCONF
},
927 #ifdef _PC_ALLOC_SIZE_MIN
928 { "POSIX_ALLOC_SIZE_MIN", _PC_ALLOC_SIZE_MIN
, PATHCONF
},
930 #ifdef _PC_REC_INCR_XFER_SIZE
931 { "POSIX_REC_INCR_XFER_SIZE", _PC_REC_INCR_XFER_SIZE
, PATHCONF
},
933 #ifdef _PC_REC_MAX_XFER_SIZE
934 { "POSIX_REC_MAX_XFER_SIZE", _PC_REC_MAX_XFER_SIZE
, PATHCONF
},
936 #ifdef _PC_REC_MIN_XFER_SIZE
937 { "POSIX_REC_MIN_XFER_SIZE", _PC_REC_MIN_XFER_SIZE
, PATHCONF
},
939 #ifdef _PC_REC_XFER_ALIGN
940 { "POSIX_REC_XFER_ALIGN", _PC_REC_XFER_ALIGN
, PATHCONF
},
942 #ifdef _PC_SYMLINK_MAX
943 { "SYMLINK_MAX", _PC_SYMLINK_MAX
, PATHCONF
},
945 #ifdef _CS_GNU_LIBC_VERSION
946 { "GNU_LIBC_VERSION", _CS_GNU_LIBC_VERSION
, CONFSTR
},
948 #ifdef _CS_GNU_LIBPTHREAD_VERSION
949 { "GNU_LIBPTHREAD_VERSION", _CS_GNU_LIBPTHREAD_VERSION
, CONFSTR
},
951 #ifdef _PC_2_SYMLINKS
952 { "POSIX2_SYMLINKS", _PC_2_SYMLINKS
, PATHCONF
},
955 #ifdef _SC_LEVEL1_ICACHE_SIZE
956 { "LEVEL1_ICACHE_SIZE", _SC_LEVEL1_ICACHE_SIZE
, SYSCONF
},
958 #ifdef _SC_LEVEL1_ICACHE_ASSOC
959 { "LEVEL1_ICACHE_ASSOC", _SC_LEVEL1_ICACHE_ASSOC
, SYSCONF
},
961 #ifdef _SC_LEVEL1_ICACHE_LINESIZE
962 { "LEVEL1_ICACHE_LINESIZE", _SC_LEVEL1_ICACHE_LINESIZE
, SYSCONF
},
964 #ifdef _SC_LEVEL1_DCACHE_SIZE
965 { "LEVEL1_DCACHE_SIZE", _SC_LEVEL1_DCACHE_SIZE
, SYSCONF
},
967 #ifdef _SC_LEVEL1_DCACHE_ASSOC
968 { "LEVEL1_DCACHE_ASSOC", _SC_LEVEL1_DCACHE_ASSOC
, SYSCONF
},
970 #ifdef _SC_LEVEL1_DCACHE_LINESIZE
971 { "LEVEL1_DCACHE_LINESIZE", _SC_LEVEL1_DCACHE_LINESIZE
, SYSCONF
},
973 #ifdef _SC_LEVEL2_CACHE_SIZE
974 { "LEVEL2_CACHE_SIZE", _SC_LEVEL2_CACHE_SIZE
, SYSCONF
},
976 #ifdef _SC_LEVEL2_CACHE_ASSOC
977 { "LEVEL2_CACHE_ASSOC", _SC_LEVEL2_CACHE_ASSOC
, SYSCONF
},
979 #ifdef _SC_LEVEL2_CACHE_LINESIZE
980 { "LEVEL2_CACHE_LINESIZE", _SC_LEVEL2_CACHE_LINESIZE
, SYSCONF
},
982 #ifdef _SC_LEVEL3_CACHE_SIZE
983 { "LEVEL3_CACHE_SIZE", _SC_LEVEL3_CACHE_SIZE
, SYSCONF
},
985 #ifdef _SC_LEVEL3_CACHE_ASSOC
986 { "LEVEL3_CACHE_ASSOC", _SC_LEVEL3_CACHE_ASSOC
, SYSCONF
},
988 #ifdef _SC_LEVEL3_CACHE_LINESIZE
989 { "LEVEL3_CACHE_LINESIZE", _SC_LEVEL3_CACHE_LINESIZE
, SYSCONF
},
991 #ifdef _SC_LEVEL4_CACHE_SIZE
992 { "LEVEL4_CACHE_SIZE", _SC_LEVEL4_CACHE_SIZE
, SYSCONF
},
994 #ifdef _SC_LEVEL4_CACHE_ASSOC
995 { "LEVEL4_CACHE_ASSOC", _SC_LEVEL4_CACHE_ASSOC
, SYSCONF
},
997 #ifdef _SC_LEVEL4_CACHE_LINESIZE
998 { "LEVEL4_CACHE_LINESIZE", _SC_LEVEL4_CACHE_LINESIZE
, SYSCONF
},
1002 { "IPV6", _SC_IPV6
, SYSCONF
},
1004 #ifdef _SC_RAW_SOCKETS
1005 { "RAW_SOCKETS", _SC_RAW_SOCKETS
, SYSCONF
},
1008 { NULL
, 0, SYSCONF
}
1012 static const struct { const char *name
; int num
; } specs
[] =
1014 { "XBS5_ILP32_OFF32", _SC_XBS5_ILP32_OFF32
},
1015 { "XBS5_ILP32_OFFBIG", _SC_XBS5_ILP32_OFFBIG
},
1016 { "XBS5_LP64_OFF64", _SC_XBS5_LP64_OFF64
},
1017 { "XBS5_LPBIG_OFFBIG", _SC_XBS5_LPBIG_OFFBIG
},
1018 { "POSIX_V6_ILP32_OFF32", _SC_V6_ILP32_OFF32
},
1019 { "POSIX_V6_ILP32_OFFBIG", _SC_V6_ILP32_OFFBIG
},
1020 { "POSIX_V6_LP64_OFF64", _SC_V6_LP64_OFF64
},
1021 { "POSIX_V6_LPBIG_OFFBIG", _SC_V6_LPBIG_OFFBIG
},
1022 { "POSIX_V7_ILP32_OFF32", _SC_V7_ILP32_OFF32
},
1023 { "POSIX_V7_ILP32_OFFBIG", _SC_V7_ILP32_OFFBIG
},
1024 { "POSIX_V7_LP64_OFF64", _SC_V7_LP64_OFF64
},
1025 { "POSIX_V7_LPBIG_OFFBIG", _SC_V7_LPBIG_OFFBIG
},
1027 static const int nspecs
= sizeof (specs
) / sizeof (specs
[0]);
1029 extern const char *__progname
;
1036 _("Usage: %s [-v specification] variable_name [pathname]\n"),
1039 _(" %s -a [pathname]\n"), __progname
);
1045 print_all (const char *path
)
1047 register const struct conf
*c
;
1051 for (c
= vars
; c
->name
!= NULL
; ++c
) {
1052 printf("%-35s", c
->name
);
1055 value
= pathconf (path
, c
->call_name
);
1057 printf("%ld", value
);
1062 value
= sysconf (c
->call_name
);
1064 if (c
->call_name
== _SC_UINT_MAX
1065 || c
->call_name
== _SC_ULONG_MAX
)
1066 printf ("%lu", value
);
1069 printf ("%ld", value
);
1074 clen
= confstr (c
->call_name
, (char *) NULL
, 0);
1075 cvalue
= (char *) malloc (clen
);
1077 error (3, 0, _("memory exhausted"));
1078 if (confstr (c
->call_name
, cvalue
, clen
) != clen
)
1079 error (3, errno
, "confstr");
1080 printf ("%.*s\n", (int) clen
, cvalue
);
1089 main (int argc
, char *argv
[])
1091 register const struct conf
*c
;
1093 /* Set locale. Do not set LC_ALL because the other categories must
1094 not be affected (according to POSIX.2). */
1095 setlocale (LC_CTYPE
, "");
1096 setlocale (LC_MESSAGES
, "");
1098 /* Initialize the message catalog. */
1099 textdomain (PACKAGE
);
1101 if (argc
> 1 && strcmp (argv
[1], "--version") == 0)
1103 printf ("getconf (GNU %s) %s\n", PACKAGE
, VERSION
);
1105 Copyright (C) %s Free Software Foundation, Inc.\n\
1106 This is free software; see the source for copying conditions. There is NO\n\
1107 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
1109 printf (gettext ("Written by %s.\n"), "Roland McGrath");
1113 if (argc
> 1 && strcmp (argv
[1], "--help") == 0)
1116 Usage: getconf [-v SPEC] VAR\n\
1117 or: getconf [-v SPEC] PATH_VAR PATH\n\
1119 Get the configuration value for variable VAR, or for variable PATH_VAR\n\
1120 for path PATH. If SPEC is given, give values for compilation\n\
1121 environment SPEC.\n\n"));
1122 fputs (gettext ("For bug reporting instructions, please see:\n\
1123 <http://www.gnu.org/software/libc/bugs.html>.\n"), stdout
);
1127 const char *getconf_dir
= getenv ("GETCONF_DIR") ?: GETCONF_DIR
;
1128 size_t getconf_dirlen
= strlen (getconf_dir
);
1130 const char *spec
= NULL
;
1131 char buf
[sizeof "POSIX_V6_LPBIG_OFFBIG"];
1132 char *argv0
= argv
[0];
1133 if (argc
> 1 && strncmp (argv
[1], "-v", 2) == 0)
1135 if (argv
[1][2] == '\0')
1153 char default_name
[getconf_dirlen
+ sizeof "/default"];
1154 memcpy (mempcpy (default_name
, getconf_dir
, getconf_dirlen
),
1155 "/default", sizeof "/default");
1156 int len
= readlink (default_name
, buf
, sizeof buf
- 1);
1164 /* Check for the specifications we know. */
1168 for (i
= 0; i
< nspecs
; ++i
)
1169 if (strcmp (spec
, specs
[i
].name
) == 0)
1173 error (2, 0, _("unknown specification \"%s\""), spec
);
1175 switch (specs
[i
].num
)
1177 #ifndef _XBS5_ILP32_OFF32
1178 case _SC_XBS5_ILP32_OFF32
:
1180 #ifndef _XBS5_ILP32_OFFBIG
1181 case _SC_XBS5_ILP32_OFFBIG
:
1183 #ifndef _XBS5_LP64_OFF64
1184 case _SC_XBS5_LP64_OFF64
:
1186 #ifndef _XBS5_LPBIG_OFFBIG
1187 case _SC_XBS5_LPBIG_OFFBIG
:
1189 #ifndef _POSIX_V6_ILP32_OFF32
1190 case _SC_V6_ILP32_OFF32
:
1192 #ifndef _POSIX_V6_ILP32_OFFBIG
1193 case _SC_V6_ILP32_OFFBIG
:
1195 #ifndef _POSIX_V6_LP64_OFF64
1196 case _SC_V6_LP64_OFF64
:
1198 #ifndef _POSIX_V6_LPBIG_OFFBIG
1199 case _SC_V6_LPBIG_OFFBIG
:
1201 #ifndef _POSIX_V7_ILP32_OFF32
1202 case _SC_V7_ILP32_OFF32
:
1204 #ifndef _POSIX_V7_ILP32_OFFBIG
1205 case _SC_V7_ILP32_OFFBIG
:
1207 #ifndef _POSIX_V7_LP64_OFF64
1208 case _SC_V7_LP64_OFF64
:
1210 #ifndef _POSIX_V7_LPBIG_OFFBIG
1211 case _SC_V7_LPBIG_OFFBIG
:
1214 const char *args
[argc
+ 3];
1215 size_t spec_len
= strlen (spec
);
1216 char getconf_name
[getconf_dirlen
+ 1 + spec_len
+ 1];
1217 memcpy (mempcpy (mempcpy (getconf_name
, getconf_dir
,
1219 "/", 1), spec
, spec_len
+ 1);
1223 memcpy (&args
[3], &argv
[1], argc
* sizeof (argv
[1]));
1224 execv (getconf_name
, (char * const *) args
);
1225 error (4, errno
, _("Couldn't execute %s"), getconf_name
);
1232 if (argc
> 1 && strcmp (argv
[1], "-a") == 0)
1237 print_all (argv
[2]);
1243 if (argc
> ai
&& strcmp (argv
[ai
], "--") == 0)
1246 if (argc
- ai
< 1 || argc
- ai
> 2)
1249 for (c
= vars
; c
->name
!= NULL
; ++c
)
1250 if (strcmp (c
->name
, argv
[ai
]) == 0
1251 || (strncmp (c
->name
, "_POSIX_", 7) == 0
1252 && strcmp (c
->name
+ 7, argv
[ai
]) == 0))
1263 value
= pathconf (argv
[ai
+ 1], c
->call_name
);
1267 error (3, errno
, "pathconf: %s", argv
[ai
+ 1]);
1269 puts (_("undefined"));
1272 printf ("%ld\n", value
);
1278 value
= sysconf (c
->call_name
);
1281 if (c
->call_name
== _SC_UINT_MAX
1282 || c
->call_name
== _SC_ULONG_MAX
)
1283 printf ("%lu\n", value
);
1285 puts (_("undefined"));
1288 printf ("%ld\n", value
);
1294 clen
= confstr (c
->call_name
, (char *) NULL
, 0);
1295 cvalue
= (char *) malloc (clen
);
1297 error (3, 0, _("memory exhausted"));
1299 if (confstr (c
->call_name
, cvalue
, clen
) != clen
)
1300 error (3, errno
, "confstr");
1302 printf ("%.*s\n", (int) clen
, cvalue
);
1307 error (2, 0, _("Unrecognized variable `%s'"), argv
[ai
]);