]>
git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/posix/sysconf.c
1 /* Copyright (C) 1991, 1993, 1995 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
88 #ifdef _POSIX_SAVED_IDS
94 return _POSIX_VERSION
;
97 return __getpagesize ();
113 case _SC_BC_SCALE_MAX
:
120 case _SC_BC_STRING_MAX
:
122 return BC_STRING_MAX
;
127 case _SC_EQUIV_CLASS_MAX
:
128 #ifdef EQUIV_CLASS_MAX
129 return EQUIV_CLASS_MAX
;
134 case _SC_EXPR_NEST_MAX
:
136 return EXPR_NEST_MAX
;
157 /* This is actually supposed to return the version
158 of the 1003.2 utilities on the system {POSIX2_VERSION}. */
159 return _POSIX2_C_VERSION
;
162 #ifdef _POSIX2_C_BIND
163 return _POSIX2_C_BIND
;
170 return _POSIX2_C_DEV
;
176 #ifdef _POSIX2_FORT_DEV
177 return _POSIX2_FORT_DEV
;
182 case _SC_2_LOCALEDEF
:
183 #ifdef _POSIX2_LOCALEDEF
184 return _POSIX2_LOCALEDEF
;
190 #ifdef _POSIX2_SW_DEV
191 return _POSIX2_SW_DEV
;
198 weak_alias (__sysconf
, sysconf
)