1 /* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
2 Contributed by Brendan Kehoe (brendan@zen.org).
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. */
25 #include <sysconfig.h>
27 extern int EXFUN(__sysconfig
, (int));
29 /* Get the value of the system variable NAME. */
31 DEFUN(__sysconf
, (name
), int name
)
54 return __sysconfig (_CONFIG_CLK_TCK
);
63 /* Both of these are looking for _CONFIG_OPEN_FILES. */
66 return __sysconfig (_CONFIG_OPEN_FILES
);
69 return __tzname_max ();
72 #ifdef _POSIX_JOB_CONTROL
78 #ifdef _POSIX_SAVED_IDS
84 return _POSIX_VERSION
;
87 return __sysconfig (_CONFIG_PAGESIZE
);
103 case _SC_BC_SCALE_MAX
:
110 case _SC_BC_STRING_MAX
:
112 return BC_STRING_MAX
;
117 case _SC_EQUIV_CLASS_MAX
:
118 #ifdef EQUIV_CLASS_MAX
119 return EQUIV_CLASS_MAX
;
124 case _SC_EXPR_NEST_MAX
:
126 return EXPR_NEST_MAX
;
147 /* This is actually supposed to return the version
148 of the 1003.2 utilities on the system {POSIX2_VERSION}. */
149 return _POSIX2_C_VERSION
;
152 #ifdef _POSIX2_C_BIND
153 return _POSIX2_C_BIND
;
160 return _POSIX2_C_DEV
;
166 #ifdef _POSIX2_FORT_DEV
167 return _POSIX2_FORT_DEV
;
173 #ifdef _POSIX2_SW_DEV
174 return _POSIX2_SW_DEV
;
181 weak_alias (__sysconf
, sysconf
)