1 /* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc.
2 Contributed by Ian Lance Taylor (ian@airs.com).
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. */
19 /* On Ultrix we can use the getsysinfo call to get the right return
20 value for _SC_CHILD_MAX. Everything else is from <sys/param.h>,
21 which the default sysconf already knows how to handle. */
26 /* This is an Ultrix header file. */
27 #include <sys/sysinfo.h>
29 extern int __getsysinfo
__P ((unsigned int op
, void *buffer
,
30 size_t nbytes
, int *start
, void *arg
));
31 extern long int __default_sysconf
__P ((int name
));
37 if (name
== _SC_CHILD_MAX
)
43 /* getsysinfo returns the number of values it put into the
44 buffer, or 0 if not available, or -1 on error. */
45 if (__getsysinfo (GSI_MAX_UPROCS
, &ret
, sizeof (ret
), &start
,
55 return __default_sysconf (name
);
58 #define __sysconf __default_sysconf
60 #include <sysdeps/posix/sysconf.c>