1 /* Copyright (C) 1991, 1993, 1995, 1996 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
9 The GNU C Library 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 GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If
16 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
17 Cambridge, MA 02139, USA. */
27 extern int EXFUN(__getdtablesize
, (NOARGS
));
28 extern size_t EXFUN(__getpagesize
, (NOARGS
));
30 /* Get the value of the system variable NAME. */
32 DEFUN(__sysconf
, (name
), int name
)
69 return __getdtablesize ();
79 return __tzname_max ();
82 #ifdef _POSIX_JOB_CONTROL
89 #ifdef _POSIX_SAVED_IDS
95 case _SC_REALTIME_SIGNALS
:
96 #ifdef _POSIX_REALTIME_SIGNALS
102 case _SC_PRIORITY_SCHEDULING
:
103 #ifdef _POSIX_PRIORITY_SCHEDULING
116 case _SC_ASYNCHRONOUS_IO
:
117 #ifdef _POSIX_ASYNCHRONOUS_IO
123 case _SC_PRIORITIZED_IO
:
124 #ifdef _POSIX_PRIORITIZED_IO
130 case _SC_SYNCHRONIZED_IO
:
131 #ifdef _POSIX_SYNCHRONIZED_IO
144 case _SC_MAPPED_FILES
:
145 #ifdef _POSIX_MAPPED_FILES
152 #ifdef _POSIX_MEMLOCK
158 case _SC_MEMLOCK_RANGE
:
159 #ifdef _POSIX_MEMLOCK_RANGE
165 case _SC_MEMORY_PROTECTION
:
166 #ifdef _POSIX_MEMORY_PROTECTION
172 case _SC_MESSAGE_PASSING
:
173 #ifdef _POSIX_MESSAGE_PASSING
180 #ifdef _POSIX_SEMAPHORES
186 case _SC_SHARED_MEMORY_OBJECTS
:
187 #ifdef _POSIX_SHARED_MEMORY_OBJECTS
194 return _POSIX_VERSION
;
197 return __getpagesize ();
199 case _SC_BC_BASE_MAX
:
213 case _SC_BC_SCALE_MAX
:
220 case _SC_BC_STRING_MAX
:
222 return BC_STRING_MAX
;
227 case _SC_EQUIV_CLASS_MAX
:
228 #ifdef EQUIV_CLASS_MAX
229 return EQUIV_CLASS_MAX
;
234 case _SC_EXPR_NEST_MAX
:
236 return EXPR_NEST_MAX
;
255 case _SC_CHARCLASS_NAME_MAX
:
256 #ifdef CHARCLASS_NAME_MAX
257 return CHARCLASS_NAME_MAX
;
263 /* This is actually supposed to return the version
264 of the 1003.2 utilities on the system {POSIX2_VERSION}. */
265 return _POSIX2_C_VERSION
;
268 #ifdef _POSIX2_C_BIND
269 return _POSIX2_C_BIND
;
276 return _POSIX2_C_DEV
;
282 #ifdef _POSIX2_FORT_DEV
283 return _POSIX2_FORT_DEV
;
288 case _SC_2_LOCALEDEF
:
289 #ifdef _POSIX2_LOCALEDEF
290 return _POSIX2_LOCALEDEF
;
296 #ifdef _POSIX2_SW_DEV
297 return _POSIX2_SW_DEV
;
304 weak_alias (__sysconf
, sysconf
)