1 /* Copyright (C) 1993,1995,1996,1997,2002,2004 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Brendan Kehoe (brendan@zen.org).
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
25 #include <sysconfig.h>
27 extern int __sysconfig (int);
29 /* Get the value of the system variable NAME. */
55 return __sysconfig (_CONFIG_CLK_TCK
);
64 /* Both of these are looking for _CONFIG_OPEN_FILES. */
67 return __sysconfig (_CONFIG_OPEN_FILES
);
70 return __tzname_max ();
73 #ifdef _POSIX_JOB_CONTROL
80 #ifdef _POSIX_SAVED_IDS
86 case _SC_REALTIME_SIGNALS
:
87 #ifdef _POSIX_REALTIME_SIGNALS
93 case _SC_PRIORITY_SCHEDULING
:
94 #ifdef _POSIX_PRIORITY_SCHEDULING
107 case _SC_ASYNCHRONOUS_IO
:
108 #ifdef _POSIX_ASYNCHRONOUS_IO
114 case _SC_PRIORITIZED_IO
:
115 #ifdef _POSIX_PRIORITIZED_IO
121 case _SC_SYNCHRONIZED_IO
:
122 #ifdef _POSIX_SYNCHRONIZED_IO
135 case _SC_MAPPED_FILES
:
136 #ifdef _POSIX_MAPPED_FILES
143 #ifdef _POSIX_MEMLOCK
149 case _SC_MEMLOCK_RANGE
:
150 #ifdef _POSIX_MEMLOCK_RANGE
156 case _SC_MEMORY_PROTECTION
:
157 #ifdef _POSIX_MEMORY_PROTECTION
163 case _SC_MESSAGE_PASSING
:
164 #ifdef _POSIX_MESSAGE_PASSING
171 #ifdef _POSIX_SEMAPHORES
177 case _SC_SHARED_MEMORY_OBJECTS
:
178 #ifdef _POSIX_SHARED_MEMORY_OBJECTS
185 return _POSIX_VERSION
;
188 return __sysconfig (_CONFIG_PAGESIZE
);
190 case _SC_AIO_LISTIO_MAX
:
191 #ifdef AIO_LISTIO_MAX
192 return AIO_LISTIO_MAX
;
204 case _SC_AIO_PRIO_DELTA_MAX
:
205 #ifdef AIO_PRIO_DELTA_MAX
206 return AIO_PRIO_DELTA_MAX
;
211 case _SC_DELAYTIMER_MAX
:
212 #ifdef DELAYTIMER_MAX
213 return DELAYTIMER_MAX
;
218 case _SC_MQ_OPEN_MAX
:
225 case _SC_MQ_PRIO_MAX
:
239 case _SC_SEM_NSEMS_MAX
:
241 return SEM_NSEMS_MAX
;
246 case _SC_SEM_VALUE_MAX
:
248 return SEM_VALUE_MAX
;
253 case _SC_SIGQUEUE_MAX
:
267 case _SC_BC_BASE_MAX
:
281 case _SC_BC_SCALE_MAX
:
288 case _SC_BC_STRING_MAX
:
290 return BC_STRING_MAX
;
295 case _SC_EQUIV_CLASS_MAX
:
296 #ifdef EQUIV_CLASS_MAX
297 return EQUIV_CLASS_MAX
;
302 case _SC_EXPR_NEST_MAX
:
304 return EXPR_NEST_MAX
;
323 case _SC_CHARCLASS_NAME_MAX
:
324 #ifdef CHARCLASS_NAME_MAX
325 return CHARCLASS_NAME_MAX
;
331 /* This is actually supposed to return the version
332 of the 1003.2 utilities on the system {POSIX2_VERSION}. */
333 return _POSIX2_C_VERSION
;
336 #ifdef _POSIX2_C_BIND
337 return _POSIX2_C_BIND
;
344 return _POSIX2_C_DEV
;
350 #ifdef _POSIX2_FORT_DEV
351 return _POSIX2_FORT_DEV
;
357 #ifdef _POSIX2_SW_DEV
358 return _POSIX2_SW_DEV
;
365 weak_alias (__sysconf
, sysconf
)
366 libc_hidden_def (__sysconf
)